diff options
author | wm4 <wm4@nowhere> | 2013-06-14 23:16:58 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-06-15 18:34:43 +0200 |
commit | 18b6ff0d4ed6c053f1bb2751bc837c0e642ff726 (patch) | |
tree | edfe28e3876f0c7df751e14f342e73154f36d0ca /video/decode | |
parent | abbb45ce13bdf9c21ad673253ca5cc6279bbe36d (diff) | |
download | mpv-18b6ff0d4ed6c053f1bb2751bc837c0e642ff726.tar.bz2 mpv-18b6ff0d4ed6c053f1bb2751bc837c0e642ff726.tar.xz |
gl_video: fix scaling when image is cropped, or with no-npot
When the displayed image is cropped in Y direction (like using panscan
controls when playing 4:3 video on a 16:9 monitor), and separated
scaling is used, the texture size for the FBO holding the intermediate
result was calculated incorrectly. This could lead to artifacts, which
were quite apparent with extreme scale factors.
Actually, the size of that texture is OK, but the texture shouldn't be
used to hold the complete scaled image. Instead, it should be used for
the visible part of the image only. Because separate scaling works by
scaling in Y direction first, it's still fine to scale the image on the
full image width on the first pass. This helps avoiding artifacts on
the left/right border of the image when scaling in X direction, as the
scaler will try to fetch pixels from beyond the border. (The left border
is still kind of fine, but the right border will fetch garbage, unless
the texture is strictly sized, or explicit clamping is added to the
shader. Too much trouble, so using the full image width is simpler.)
Also fix some issues with no-npot mode, which enables use of power-of-2
textures. Maybe this mode isn't really useful anymore (modern hardware
is faster with smaller non-power-of-2 textures), but keep it for now.
Diffstat (limited to 'video/decode')
0 files changed, 0 insertions, 0 deletions