[vlc-devel] Bugs in VLC Theora: theora_info.frame_height, offset_y

Kevin H. Patterson kevpatt at khptech.com
Fri May 5 00:56:09 CEST 2006


I'm new to this list, so please forgive me if there's a better way to 
mention this...

I'm writing a complex streaming media server app and it includes a 
database-driven encoder module. The encoded files are in 
ogg+theora+vorbis format, and VLC seems to play them well (from disk or 
from the server via http), except for a few problems:

* VLC does not seem to handle theora_info.frame_height or 
theora_info.offset_y correctly.

If you want to mask (crop) a few lines from the top of a picture by 
encoding an ogg theora file using theora's frame_height and offset_y, on 
playback VLC seems to crop the top of the picture correctly, but it 
skews the picture horizontally as well (the picture is shifted sideways 
and wraps around to the other side.) I've not looked at the source code 
for VLC (yet), but I an idea of what might be wrong:

I think in the code you might be cropping the top of the picture using 
theora_info.width or frame_width INSTEAD of  yuv_buffer.y_stride, etc. 
In other words, you need to look at the output buffer's line stride for 
calculating entire rows, instead of width or frame_width, since there 
are usually some extra bytes per row. If these are not included, the 
error adds up and when you get to the first row of the picture you are 
off horizontally.

I could be wrong about the cause of the problem but I think there's a 
good chance that this is it. I don't have time to look at the source 
code or SVN access, but I'm hoping somebody can make this a "quick fix."

I have some example files that I can put up on the web if anyone wants 
to test/observe this effect.

-Kevin H. Patterson

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3245 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20060504/b15b8b7c/attachment.bin>

More information about the vlc-devel mailing list