summaryrefslogtreecommitdiffstats
path: root/video/out/opengl/utils.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-03-28 16:30:48 +0200
committerwm4 <wm4@nowhere>2016-03-28 17:02:27 +0200
commit5827d9cc090484cd4c55753a912d05f98a4a0444 (patch)
tree1f17636ac9c92e140a742fbf024338d64f4c79be /video/out/opengl/utils.c
parente5b5cc2a2f45a7f80ea56d381db2b5d7635077d4 (diff)
downloadmpv-5827d9cc090484cd4c55753a912d05f98a4a0444.tar.bz2
mpv-5827d9cc090484cd4c55753a912d05f98a4a0444.tar.xz
vo_opengl: fix rotation
This has been completely broken since commit 93546f0c. But even before, rotation handling did not make too much sense. In particular, it rotated the contents of the cropped image, instead of adjusting the crop rectangle as well. The result was that things like panscan or zooming did not behave as expected with rotation applied. The same is true for vertical flipping. Flipping is triggered by negative image stride. OpenGL does not support flipping the image on upload, so it's done as part of the rendering. It can be triggered with --vf=flip, but other filters and even decoders could setup negative stride to flip the image. Fix these issues by applying transforms to texture coordinates properly, and by making rotation and flipping part of these transforms. This still doesn't work properly for separated scaling. The issue is that we'd have to adjust how the passes are done. For now, pick a very stupid solution by rotating the image to a FBO, and then scaling from that. This has the avantage that the scale logic doesn't have to be complicated for such a rare case. It could be improved later. Prescaling is apparently still broken. I don't know if chroma positioning works properly either. None of this should affect the case with no rotation.
Diffstat (limited to 'video/out/opengl/utils.c')
0 files changed, 0 insertions, 0 deletions