[MPlayer-dev-eng] [PATCH] Fix offsetting in Theora video files

Giorgio mywing81 at gmail.com
Mon Mar 15 13:34:56 CET 2010


Hello :)

This patch fixes offsetting in Theora video files.

Currently, mplayer is not able to use the offset values stored in a
theora video stream. Because of this, the following files:

http://v2v.cc/~j/theora_testsuite/offset_test.ogv (even offset values)
http://v2v.cc/~j/theora_testsuite/322x242_not-divisible-by-sixteen-framesize.ogg
(odd offset values)
http://blip.tv/file/get/Miropcf-Miro20Introduction771.ogv (from miro homepage)

don't play properly, showing the wrong area of the frame and/or
borders around the picture.
My patch fixes this problem for 4:4:4, 4:2:2 and 4:2:0 video files,
simply by adding a correction to the plane pointers in order to
display the right area or the frame.
In case of an odd offset in a 4:2:2 or 4:2:0 file though, 2 pixels of
the picture will be cropped in that direction (so, for an odd offset
in the x direction, one pixel on the left and one on the right will be
cropped).
If you think that the message I added is not useful, feel free to remove it.

Lastly, I'm not sure this is the best way to handle offsetting in
mplayer, if there is a better way please don't consider this patch :)
Thank you.

Giorgio Vazzana
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mplayer-theora-offset-00.diff
Type: text/x-diff
Size: 3944 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20100315/980a15db/attachment.diff>


More information about the MPlayer-dev-eng mailing list