mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-09 14:14:39 +02:00
lavfi/stereo3d: avoid division when changing aspect ratio
Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
parent
42d61fd968
commit
6a8d05061f
@ -349,25 +349,25 @@ static int config_output(AVFilterLink *outlink)
|
|||||||
memcpy(s->ana_matrix, ana_coeff[s->out.format], sizeof(s->ana_matrix));
|
memcpy(s->ana_matrix, ana_coeff[s->out.format], sizeof(s->ana_matrix));
|
||||||
break;
|
break;
|
||||||
case SIDE_BY_SIDE_2_LR:
|
case SIDE_BY_SIDE_2_LR:
|
||||||
aspect.num /= 2;
|
aspect.den *= 2;
|
||||||
case SIDE_BY_SIDE_LR:
|
case SIDE_BY_SIDE_LR:
|
||||||
s->out.width = s->width * 2;
|
s->out.width = s->width * 2;
|
||||||
s->out.off_right = s->width;
|
s->out.off_right = s->width;
|
||||||
break;
|
break;
|
||||||
case SIDE_BY_SIDE_2_RL:
|
case SIDE_BY_SIDE_2_RL:
|
||||||
aspect.num /= 2;
|
aspect.den *= 2;
|
||||||
case SIDE_BY_SIDE_RL:
|
case SIDE_BY_SIDE_RL:
|
||||||
s->out.width = s->width * 2;
|
s->out.width = s->width * 2;
|
||||||
s->out.off_left = s->width;
|
s->out.off_left = s->width;
|
||||||
break;
|
break;
|
||||||
case ABOVE_BELOW_2_LR:
|
case ABOVE_BELOW_2_LR:
|
||||||
aspect.den /= 2;
|
aspect.num *= 2;
|
||||||
case ABOVE_BELOW_LR:
|
case ABOVE_BELOW_LR:
|
||||||
s->out.height = s->height * 2;
|
s->out.height = s->height * 2;
|
||||||
s->out.row_right = s->height;
|
s->out.row_right = s->height;
|
||||||
break;
|
break;
|
||||||
case ABOVE_BELOW_2_RL:
|
case ABOVE_BELOW_2_RL:
|
||||||
aspect.den /= 2;
|
aspect.num *= 2;
|
||||||
case ABOVE_BELOW_RL:
|
case ABOVE_BELOW_RL:
|
||||||
s->out.height = s->height * 2;
|
s->out.height = s->height * 2;
|
||||||
s->out.row_left = s->height;
|
s->out.row_left = s->height;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user