[Ffmpeg-devel] Re: [Ffmpeg-devel-old] H.264 multislice implementation

Loïc Le Loarer lll+ffmpeg
Wed Apr 13 00:27:30 CEST 2005

Le Tuesday 12 April 2005 ? 19:46:29 +0800, Champ Yan a ?crit:
> Dear all:
>     It seems that the H.264 decoder in FFMPEG doesn't
> support more than one slice in a frame. I have traced
> the source. In decode_nal_units(), it decodes one
> slice per frame.

This is wrong. decode_nal_units is an infinite loop which decode all the
NAL in the input buffer. So all the logic is the creation of theses
buffers. In avc mode, it is done by the encoder at the mux level and
ffmpeg use the chunk limit directly, in all other modes (raw bitstream),
it is done by the h264_parse function which smart part is find_frame_end
function. This function already support multiple slices (and the rest of
the code too) when Arbitary Slice Order (ASO) is not used (and when
there is no fields).

To support ASO and fields, we need to write a smarter find_frame_end
which decode SPS and PPS and the beginning of slice header, and use the
relevant chapter of the norm already quoted on this list.

Best Regards.

P.S.: please use the new list address.


"heaven is not a place, it's a feeling"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20050413/4f546d0e/attachment-0001.pgp>

More information about the ffmpeg-devel mailing list