[FFmpeg-devel] [PATCH] flag CODEC_FLAG2_RETURN_INCOMPLETE_FRAMES
Sun Dec 12 00:05:09 CET 2010
On Sat, Dec 11, 2010 at 1:26 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> On Sat, Dec 04, 2010 at 08:22:59PM -0800, Jason Garrett-Glaser wrote:
>> On Sat, Dec 4, 2010 at 8:03 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
>> > On Sat, Nov 06, 2010 at 11:22:08AM -0700, Jason Garrett-Glaser wrote:
>> >> 2010/11/5 Anatoly Nenashev <anatoly.nenashev at ovsoft.ru>:
>> >> > Hi!
>> >> > Due to Michael's comments in a thread "MxPEG decoder" the flag
>> >> > CODEC_FLAG2_RETURN_INCOMPLETE_FRAMES has been added.
>> >> > It can be useful for h264 format also.
>> >> Is this related to the patch I have here (hack)?
>> > iam not sure, if it can be used for this.
>> > Either way our decoder should be fixed to return such incomplete frames once
>> > it sees a slice of the next frame
>> > or maybe a access unit delimiter could be injected to force the last frame to
>> > be retunrned but this is somewhat a hack too
>> FYI this hack is being used in production (or will be very soon) on a
>> client-side ffmpeg-based video application, so there are people who
>> consider the ability to say "this frame is done" (or at least get back
>> the frame eventually) important.
> does your solution have an advantage over what i suggested? ?That is
> implementing what is written in
> "22.214.171.124.4 Detection of the first VCL NAL unit of a primary coded picture"
> that way a picture would be returned once the first slice of the next is
> feeded in or something like a access unit delimiter is inserted
I don't know, but take the following example.
Suppose frame 10 has 5 slices. The last goes missing. Frame 11 has 1 slice.
We tell libavcodec to decode frame 10, slice by slice. The last is
missing, so it doesn't give us a frame back.
Then we tell libavcodec to decode frame 11, slice by slice. It now
has to give us both frame 10 and 11 -- at the same time. I don't
think the libavcodec API supports that.
More information about the ffmpeg-devel