[Live-devel] Possible bug in H264VideoStreamParser

Mcnamara, JohnX johnx.mcnamara at intel.com
Wed Apr 25 05:52:25 PDT 2012


Hi,

The H264VideoStreamParser::Parse() method appears to insert additional 0x00000001 start codes when the buffered data is greater than the BANK_SIZE and the fBank[] banks are switched.

Steps to reproduce:

    1. Convert a H.264 video such as the Live555 sample slamtv10.264 file
       to MPEG-TS using testProgs/testH264VideoToTransportStream.
    2. Demux the H.264 data from the MPEG-TS file. (I used a modified
       version of testProgs/MPEG2TransportStreamIndexer).
    3. Compare the demuxed H.264 data with the input H.264 file.

In the output file at every BANK_SIZE (approx) offset there is an addition 0x00000001 start code compared to the source data. This doesn't (generally occur) at the start of a NAL unit.

The first difference occurs after the byte sequence 0x94caf7ce in the TS or H.264 files (using slamtv10.264 as an input). It is followed by an extra 0x00000001:

    ...
    94ca f7ce
    0000 0001
    83f3 539b
    ...

The demuxed H.264 data causes the JM H.264 reference decoder to complain:

    http://iphome.hhi.de/suehring/tml/

    Error: Found NALU with forbidden_bit set, bit error?


It is probably caused by StreamParser::ensureValidBytes1() throwing an (intended) exception after the BANK_SIZE buffer is full which causes a re-entry to H264VideoStreamParser::parse() which in turn does save4Bytes(0x00000001) when fOutputStartCodeSize is non-zero. However, it may not be valid to add the start code in this case.

This was tested with Live555 version "2012.04.18".

Do you think this is an issue or is it valid output?

Regards,

John.
--

--------------------------------------------------------------
Intel Shannon Limited
Registered in Ireland
Registered Office: Collinstown Industrial Park, Leixlip, County Kildare
Registered Number: 308263
Business address: Dromore House, East Park, Shannon, Co. Clare

This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20120425/df99b763/attachment.html>


More information about the live-devel mailing list