[FFmpeg-devel] [RFC] Error concealment for B-frames/fixing issue 824

Michael Niedermayer michaelni
Thu Apr 9 22:11:04 CEST 2009


On Thu, Apr 09, 2009 at 11:37:32AM +0200, Reimar D?ffinger wrote:
> Hello,
> please be kind, I do not know much about the code...
> My idea was that we already have error concealment code and it could be
> used instead of just dropping B-frame, which attached patch should do.
> I do admit though that I am not sure about the full consequence of this
> change, in particular if it might make error concealment worse in some
> cases.

[...]
> Index: libavcodec/mpeg12.c
> ===================================================================
> --- libavcodec/mpeg12.c	(revision 18382)
> +++ libavcodec/mpeg12.c	(working copy)
> @@ -2385,10 +2385,7 @@
>                  start_code <= SLICE_MAX_START_CODE) {
>                  int mb_y= start_code - SLICE_MIN_START_CODE;
>  
> -                if(s2->last_picture_ptr==NULL){
> -                /* Skip B-frames if we do not have reference frames. */
> -                    if(s2->pict_type==FF_B_TYPE) break;
> -                }
> +                /* B-frames with missing reference frames are handled by error concealment code. */
>                  if(s2->next_picture_ptr==NULL){
>                  /* Skip P-frames if we do not have a reference frame or we have an invalid header. */
>                      if(s2->pict_type==FF_P_TYPE && (s2->first_field || s2->picture_structure==PICT_FRAME)) break;

does this also let B frames before I frames pass? its very unlikely
that such frames are decodeable that is with neither reference frame

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Into a blind darkness they enter who follow after the Ignorance,
they as if into a greater darkness enter who devote themselves
to the Knowledge alone. -- Isha Upanishad
-------------- 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/20090409/e74e8bf6/attachment.pgp>



More information about the ffmpeg-devel mailing list