History

avfilter/vf_v360: add partial size setup for flat

Other part of size is calculated from both available horizontal and vertical FOV and given one size component.

Paul B Mahol committed 6 years ago

Commit f707c841 parent 3733a6b1 file · +9 −1Browse files

Unified · Split

libavfilter/vf_v360.c+9−1
@@ -3790,7 +3790,15 @@ static int config_output(AVFilterLink *outlink) · 3789 unmodified lines
37903790 }
37913791
37923792 // Override resolution with user values if specified
3793− if (s->width > 0 && s->height > 0) {
3793+ if (s->width > 0 && s->height <= 0 && s->h_fov > 0.f && s->v_fov > 0.f &&
3794+ s->out == FLAT && s->d_fov == 0.f) {
3795+ w = s->width;
3796+ h = w / tanf(s->h_fov * M_PI / 360.f) * tanf(s->v_fov * M_PI / 360.f);
3797+ } else if (s->width <= 0 && s->height > 0 && s->h_fov > 0.f && s->v_fov > 0.f &&
3798+ s->out == FLAT && s->d_fov == 0.f) {
3799+ h = s->height;
3800+ w = h / tanf(s->v_fov * M_PI / 360.f) * tanf(s->h_fov * M_PI / 360.f);
3801+ } else if (s->width > 0 && s->height > 0) {
37943802 w = s->width;
37953803 h = s->height;
37963804 } else if (s->width > 0 || s->height > 0) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t