[FFmpeg-devel] Reordering of GOP Frames
QuickTime
ffmpeg
Thu Sep 13 02:32:40 CEST 2007
Dear:
The simplest answer :
the I/P will be cached until the next I/P frame reaches when "has_b_frame
"is true
On 9/13/07, Axel Gallus <uh5d at rz.uni-karlsruhe.de> wrote:
>
> Can please someone comment on my thoughts...
>
> Lets say we have the following display sequence: I B B P
> Where both B's depend on the following P.
> Therefore the above sequence has be arranged to I P B B in the videofile.
>
> 1.) av_read_frame() first reads I in AVPacket struct.
> avcodec_decode_frame() decodes AVPacket and has complete frame,
> because I = Keyframe
> frame gets converted and shown ( e.g. via sws_scale() )
>
> 2.) av_read_frame() reads P in AVPacket struct.
> avcodec_decode_frame() decodes AVPacket and signals no frame,
> because it must'nt show it at this time.
> So the P-Frame just gets buffered
>
> 3.) av_read_frame() reads B in AVPacket struct.
> avcodec_decode_frame() decodes AVPacket and has complete frame,
> because P frame already has been decoded
> frame gets converted and shown ( e.g. via sws_scale() )
>
> 4.) av_read_frame() reads B in AVPacket struct.
> avcodec_decode_frame() decodes AVPacket and has complete frame,
> because P frame already has been decoded
> frame gets converted and shown ( e.g. via sws_scale() )
>
> 5.) av_read_frame() now reads P in AVPacket struct. !??!
> avcodec_decode_frame() has complete frame, because P frame already
> has been decoded and buffered
> frame gets converted and shown ( e.g. via sws_scale() )
>
>
> Are those thought right 5 reads for 4 frames?
> If not, when does the P-frame get shown?
>
> Regards
>
> A.Gallus
>
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at mplayerhq.hu
> http://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel
>
--
//----------------------------------------
Heaven is not a place, it's just a feeling
More information about the ffmpeg-devel
mailing list