diff options
author | Rudolf Polzer <divverent@xonotic.org> | 2013-03-18 13:22:39 +0100 |
---|---|---|
committer | Rudolf Polzer <divverent@xonotic.org> | 2013-03-18 13:27:52 +0100 |
commit | 3ef58d85bab853365689ea2b76b539f9edccd6f7 (patch) | |
tree | 9849f4208dc373a56966b40759347eb4e80cd481 /core/av_common.h | |
parent | d17e0977ea58d11a9afafc7d4590763abc1348a8 (diff) | |
download | mpv-3ef58d85bab853365689ea2b76b539f9edccd6f7.tar.bz2 mpv-3ef58d85bab853365689ea2b76b539f9edccd6f7.tar.xz |
encoding-example-profiles: for Nokia N900, avoid upscaling
This yields generally smaller files, by avoiding upscaling at all times.
This method may or may not be useful for iOS, needs testing there.
Note: this uses three instances of vf_scale:
1. Scale to target dimensions, ONLY if both are <= original video
dimensions.
2. Failing that, scale to width*<calculated height by display aspect>,
ONLY if <calculated height by display aspect> <= original video
height.
3. Failing that, scale to <calculated width by display aspect>*height.
When the test before failed, we KNOW that <calculated width by
display aspect> <= original video width.
So basically, only one of the three scalers should ever be active, as
the last two scalers only can ever have an effect if the aspect ratio
mismatches the video.
As for danger of roundoff errors:
If scaler 1 succeeded, we have won. Scalers 2 and 3 will never do
anything, because display resolution == video resolution. Here it is
crucial that no rounding of video size to display size takes place; in
other words, the target display size already MUST be even, which it is
because we pass 2 to the rounding parameter of the dsize filter.
Scaler 2 and 3 are obviously mutually exclusive, as they depend on
opposite aspect ratio conditions.
We later should put this functionality directly into vf_scale...
Diffstat (limited to 'core/av_common.h')
0 files changed, 0 insertions, 0 deletions