After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 683254 - [0.11] Improve mpeg4 video parser
[0.11] Improve mpeg4 video parser
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: 0.11.x
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-09-03 09:49 UTC by Arnaud Vrac
Modified: 2012-09-14 07:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
mpeg4videoparse: do not skip user data (3.19 KB, patch)
2012-09-03 09:51 UTC, Arnaud Vrac
none Details | Review
Parse and save visual object for later video object layer parsing (3.89 KB, patch)
2012-09-03 09:52 UTC, Arnaud Vrac
none Details | Review
Fix some inconsistencies in video object layer parsing (2.31 KB, patch)
2012-09-03 09:53 UTC, Arnaud Vrac
none Details | Review
Parse complexity estimation header in video object layer (2.12 KB, patch)
2012-09-03 09:53 UTC, Arnaud Vrac
none Details | Review
Parse and save visual object for later video object layer parsing (4.77 KB, patch)
2012-09-03 11:21 UTC, Arnaud Vrac
none Details | Review

Description Arnaud Vrac 2012-09-03 09:49:30 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.
Comment 1 Arnaud Vrac 2012-09-03 09:51:58 UTC
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.
Comment 2 Arnaud Vrac 2012-09-03 09:52:36 UTC
Created attachment 223264 [details] [review]
Parse and save visual object for later video object layer parsing
Comment 3 Arnaud Vrac 2012-09-03 09:53:11 UTC
Created attachment 223265 [details] [review]
Fix some inconsistencies in video object layer parsing
Comment 4 Arnaud Vrac 2012-09-03 09:53:29 UTC
Created attachment 223267 [details] [review]
Parse complexity estimation header in video object layer
Comment 5 Arnaud Vrac 2012-09-03 11:21:43 UTC
Created attachment 223283 [details] [review]
Parse and save visual object for later video object layer parsing

Added parsing of visual object in codec_data
Comment 6 Arnaud Vrac 2012-09-10 08:37:24 UTC
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
Comment 7 Edward Hervey 2012-09-12 08:27:18 UTC
Just to be sure. Those patches are just "beauty" enhancements, right ? The files you provided seem to decode perfectly fine without those patches.
Comment 8 Arnaud Vrac 2012-09-12 08:48:31 UTC
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.
Comment 9 Edward Hervey 2012-09-14 07:20:02 UTC
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