[Mp4-tech] RE: [jvt-experts]
gaps_in_frame_num_value_allowed_flag...???
Gary Sullivan
garysull windows.microsoft.com
Tue Apr 8 11:24:48 EDT 2008
Deepak Singh et al,
Error/loss resilience is typically as much (or more) a function of what an encoder (and an overall system design) is doing to enable resilient behavior as it is a function of what a decoder is doing. We can't necessarily give you a way to make your decoder provide good output when it is fed by a bitstream from a badly designed encoder (or an encoder designed based on some different set of priorities than what your decoder is designed for).
One way that the gaps = 1 case can be useful is to provide "sub-sequence" functionality. See Annex D of the standard for specification of what this means. The marking of "non existing" pictures as "used for reference" is very useful to allow these pictures to be reference pictures within some sub-sequence that can be removed from the bitstream without affecting the decoding process of the other pictures.
So if, as you say, you are making a decoder that is "considering it as unintentional" whenever gap occur, you are not doing it right for the gaps = 1 case. When an encoder explicitly indicates in the bitstream that gaps are allowed, the decoder must respect that signal. When an encoder tells you that gaps = 1, it is telling you that it may be using the gaps for a different purpose.
Depending on the reference picture marking and reference picture list reordering processing used by the encoding, the decoder may still be able to detect unintentional losses of pictures in the gaps = 1 case, by detecting marking or inter-picture prediction referencing operations that refer to pictures that are "non existing". Such references are prohibited in the standard, so if they are detected in a decoder, they are clear indications of a problem in the bitstream.
In the gaps = 0 case, it should also be clear that any detected gaps are due to unintentional losses of data (or a very bad encoder bug).
Encoders that are not intentionally making use of sub-sequence functionality (or something similar in concept) should use gaps = 0 encoding, to enable easy detection of losses by decoders. Of course if someone designs their encoder poorly by setting gaps = 1 even though it is not using any sub-sequence functionality, then the decoder designer is not the one who is to blame if the output of the decoder is unpleasant to watch.
We generally try to enable a capability (such as easy loss detection) but not necessarily force all encoders to provide that capability all the time, at least when there are usage scenarios in which such a feature (such as an assurance that all gaps in frame_num are unintentional and indicate bitstream corruption/losses) may not be desirable.
It may be useful to look up some old JVT contributions and published papers on the topic. Some names to look for may include Miska Hannuksela and Ye-Kui Wang.
Best Regards,
Gary Sullivan
+> -----Original Message-----
+> From: jvt-experts-bounces lists.rwth-aachen.de
+> [mailto:jvt-experts-bounces lists.rwth-aachen.de] On Behalf
+> Of Deepak Singh
+> Sent: Tuesday, April 08, 2024 4:46 AM
+> To: jvt-experts lists.rwth-aachen.de
+> Cc: mp4-tech lists.mpegif.org
+> Subject: Re: [jvt-experts] gaps_in_frame_num_value_allowed_flag...???
+>
+> Hi Expert,
+>
+> ya Gary there was error in my first example.Sorry for the mistake.
+> Thanks for correcting me.
+>
+> My next query on this issue is .....based on your reply
+>
+> > I think the sequence of frame_num values for the second
+> case would be:
+> >
+> > 0,1,2,3,4,4,4,5,6,7,0
+> >
+> > So for the frames that actually "exist", the frame_num
+> values that you would observe is:
+> >
+> > 0,1,3,4,4,6,7,0.
+> >
+> Why the Non -existing frame are considered as "used for reference"
+> when those frames are non- existing and why this is affecting the
+> "frame_num".
+> Why not Non -existing frame are considered as "Not used for
+> reference" .
+>
+> Actually I am working over "Frame Loss Recovery"....
+> For detecting the Frame Loss I am using "frame_num" to detect the
+> reference frame and if frame_num is not in order I am considering it
+> as unintentional loss of frame as for example...
+> (gap =0)
+> frame_num : 0,1,3,3,4,5,0 ...
+> So there is loss of frame having frame_num = 2.
+>
+> I am referring the IEEE paper Saurav K. Bandyopadhyay and Zhenyu Wu,
+> Purvin Pandit, Jill M. Boyce "AN ERROR CONCEALMENT SCHEME FOR ENTIRE
+> FRAME LOSSES FOR H.264/AVC" Circuits and Systems, 2006. ISCAS 2006.
+> Proceedings. 2006 IEEE International Symposium on Publication Date:
+> 21-24 May 2006
+>
+> But if gap =1.
+> How to detect the loss of frames...????
+>
+>
+>
+>
+> On Fri, Apr 4, 2024 at 9:48 PM, Gary Sullivan
+> <garysull windows.microsoft.com> wrote:
+> >
+> > I think there is an error in your first example (gaps = 0).
+> >
+> > Rather than:
+> >
+> > 0,1,2,3,3,4,5,0
+> > I think the frame_num values will be:
+> > 0,1,2,3,3,3,4,0
+> >
+> > I think the sequence of frame_num values for the second
+> case would be:
+> >
+> > 0,1,2,3,4,4,4,5,6,7,0
+> >
+> > So for the frames that actually "exist", the frame_num
+> values that you would observe is:
+> >
+> > 0,1,3,4,4,6,7,0.
+> >
+> > Best Regards,
+> >
+> > Gary Sullivan
+> >
+> > +> -----Original Message-----
+> > +> From: jvt-experts-bounces lists.rwth-aachen.de
+> > +> [mailto:jvt-experts-bounces lists.rwth-aachen.de] On Behalf
+> > +> Of Deepak Singh
+> > +> Sent: Friday, April 04, 2024 4:17 AM
+> > +> To: jvt-experts lists.rwth-aachen.de; mp4-tech lists.mpegif.org
+> > +> Subject: [jvt-experts]
+> gaps_in_frame_num_value_allowed_flag...???
+> > +>
+> > +> Dear Experts,
+> >
+> >
+> > +>
+> > +> I have query related to
+> > +> gaps_in_frame_num_value_allowed_flag and frame_num.
+> > +>
+> > +> As per my understanding of standard when
+> > +> gaps_in_frame_num_value_allowed_flag is 0 then
+> frame_num will be in
+> > +> non decreasing order and increases till next IDR frame.
+> > +>
+> > +> The value of frame_num increase with plus 1 with
+> respect to previous
+> > +> reference frame.
+> > +>
+> > +> Let me put an example for it.
+> > +>
+> > +> Lets assume B- frame is not used for reference.
+> > +> In h.264 coded bitstream the frames are : (frame_num
+> as per my
+> > +> understanding it will be)
+> > +> Note: gaps_in_frame_num_value_allowed_flag = 0
+> > +>
+> > +> Coded Frame : IDR -> P-> P-> B->B-> P-> P->IDR->....
+> > +> Frame_num : 0 1 2 3 3 4 5 0
+> > +>
+> > +> My question is for the same sequence if
+> > +> gaps_in_frame_num_value_allowed_flag = 1 and non-
+> existing frame
+> > +> exists as
+> > +>
+> > +> Note: gaps_in_frame_num_value_allowed_flag = 1, NE = Non
+> > +> Existing Frame.
+> > +> Coded Frame : IDR -> P-> NE->P-> B->B->NE->NE-> P->
+> P->IDR->....
+> > +> Frame_num : 0 1 ? ? ? ? ? ?
+> > +> ? ? 0
+> > +>
+> > +> How the frame_num value will behave for the above
+> situation???
+> > +>
+> > +>
+> > +> --
+> > +> Regards,
+> > +> Deepak Singh
+> > +>
+> > +>
+> > +>
+> > +> --
+> > +> Regards,
+> > +> Deepak Singh
+> > +>
+> > +> Visit my blog for cool stuff...
+> > +> http://www.thinknaturally.blogspot.com/
+> > +>
+> > +>
+> > +>
+> > +> *************************************************************
+> > +> *********************************
+> > +> "If u really aspire for the FIRST place ,then there is no
+> > +> second place
+> > +> in this world"
+> > +>
+> > +> *************************************************************
+> > +> ***********************************
+> > +> My phone:09341097500 Just DIL SE........
+> > +> With caresss.
+> > +>
+> > +>
+> > +>
+> > +> --
+> > +> Regards,
+> > +> Deepak Singh
+> > +>
+> > +> Visit my blog for cool stuff...
+> > +> http://www.thinknaturally.blogspot.com/
+> > +>
+> > +>
+> > +> *************************************************************
+> > +> *********************************
+> > +> "If u really aspire for the FIRST place ,then there is no
+> > +> second place
+> > +> in this world"
+> > +> *************************************************************
+> > +> ***********************************
+> > +> My phone:09341097500 Just DIL SE........
+> > +> With caresss.
+> > +> _______________________________________________
+> > +> jvt-experts mailing list
+> > +> jvt-experts lists.rwth-aachen.de
+> > +> http://mailman.rwth-aachen.de/mailman/listinfo/jvt-experts
+> > +>
+> > +>
+> >
+>
+>
+>
+> --
+> Regards,
+> Deepak Singh
+> _______________________________________________
+> jvt-experts mailing list
+> jvt-experts lists.rwth-aachen.de
+> http://mailman.rwth-aachen.de/mailman/listinfo/jvt-experts
+>
+>
More information about the Mp4-tech
mailing list