[FFmpeg-devel] does ffmpeg decoder clipps the num_ref_frames to MaxDpbSize when num_ref_frames exeeds MaxDpbSize

Mike Scheutzow mike.scheutzow at alcatel-lucent.com
Fri Apr 27 14:40:21 CEST 2012


chemsi mehdi wrote:
> I have a stream which is properly decoded with VLC but the professional tool (Elecard) has raisen many issues
>  
> 
> the stream presents an encoding violation that leads to noticed macrobloks at display stage.
>   
> As it is encoded the stream needs 16 reference frame buffers and such number exceeds the MaxDpbSize
>  
> (maximum number of reference frame buffer) which is encoded as 9.
>  
> H264 standards(subclauseA.3.1 or A.3.2) states that The value of reference frame buffer number
>  
> (num_ref_frames)shall be in the range of 0 to MaxDpbSize.
>  
> I knew that VLC player uses fffmpeg to decode H264.  
>  
> does ffmpeg decoder clipps the num_ref_frames to MaxDpbSize when num_ref_frames exeeds MaxDpbSize?

No, I don't believe so. But this is OK, because a decoder is always 
permitted to do more than is allowed by a standard. The ffmpeg decoder 
does not promise to reject non-compliant bitstreams.

If the bitstream is invalid, this is an encoder error, not a decoder error.


Mike Scheutzow


More information about the ffmpeg-devel mailing list