GNOME Bugzilla – Bug 683254
[0.11] Improve mpeg4 video parser
Last modified: 2012-09-14 07:20:02 UTC
Hi, Here are some patches that improves the mpeg4 video parser. I found some inconsistencies in the codec parser after looking at the spec, and implemented parsing of the complexity estimation headers. I also fixed some issues in the parser plugin, mainly pass the VisualObject when parsing the Video Object Layer so that the verid field is set correctly. I also tested with some XviD and DivX files by adding the related media types in the sink caps. I did not make a patch for this though.
Created attachment 223263 [details] [review] mpeg4videoparse: do not skip user data User data was skipped until now, so the user data was included when parsing the previous packet and in the config buffer.
Created attachment 223264 [details] [review] Parse and save visual object for later video object layer parsing
Created attachment 223265 [details] [review] Fix some inconsistencies in video object layer parsing
Created attachment 223267 [details] [review] Parse complexity estimation header in video object layer
Created attachment 223283 [details] [review] Parse and save visual object for later video object layer parsing Added parsing of visual object in codec_data
Here are 2 videos for which VOL parsing fails: VOL parsed from byte stream: http://absolut.zogzog.org/share/samples/avi/BN00.avi VOL parsed from codec data: http://absolut.zogzog.org/share/samples/mp4/Grenadier_01_%5bZ_Y%5d%5bX%5d.mp4
Just to be sure. Those patches are just "beauty" enhancements, right ? The files you provided seem to decode perfectly fine without those patches.
It works because the VOL parsing fails after the fields needed by the plugin are extracted, so yes those are beauty enhancements. Although it is not urgent, I'd like those changes merged because in my code I need to export the number of sprites per warping point in the caps. This field was not parsed correctly without those patches in some cases. A lot of hardware decoders do not support more than 1 sprite per warping points so it helps plugging either a software or hardware decoder depending on the input.
Pushed, thanks ! commit 744bd3d3f249aa9ec548bbfe2371acf6bd098094 Author: Arnaud Vrac <avrac@freebox.fr> Date: Sun Sep 2 20:17:14 2012 +0200 mpeg4videoparse: use previously parsed visual object when parsing VOL https://bugzilla.gnome.org/show_bug.cgi?id=683254 commit 0331fb6203ecbe60230296ddf20e70d61e00eb7f Author: Arnaud Vrac <avrac@freebox.fr> Date: Sun Sep 2 20:19:17 2012 +0200 mpeg4parser: parse complexity estimation header in video object layer https://bugzilla.gnome.org/show_bug.cgi?id=683254 commit af379b0b8ea446a043fc689add749cdfc827a0a6 Author: Arnaud Vrac <avrac@freebox.fr> Date: Sun Sep 2 20:18:32 2012 +0200 mpeg4parser: fix some issues related to video object layer parsing https://bugzilla.gnome.org/show_bug.cgi?id=683254 commit 207a76daeaaaf37aa8c026153c0dfbb61486ae00 Author: Arnaud Vrac <avrac@freebox.fr> Date: Sun Sep 2 18:21:16 2012 +0200 mpeg4videoparse: do not skip user data User data was skipped until now, so the user data was included when parsing the previous packet and in the config buffer. https://bugzilla.gnome.org/show_bug.cgi?id=683254