[Ffmpeg-devel] libavcodec/h264.c broken with gcc 2.95

Guillaume Poirier guillaume.poirier
Fri Oct 28 17:02:31 CEST 2005


Luca Abeni wrote:
> Hello,
> 
> libavcodec/h264.c does not compile with gcc 2.95.
> The attached patch fixes the problem (Warning: to minimize the patch
> size, I did not reindent the code).
> 
> 			Luca
> 
> 
> ------------------------------------------------------------------------
> 
> Index: libavcodec/h264.c
> ===================================================================
> RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/h264.c,v
> retrieving revision 1.162
> diff -u -r1.162 h264.c
> --- libavcodec/h264.c	28 Oct 2005 06:37:32 -0000	1.162
> +++ libavcodec/h264.c	28 Oct 2005 14:55:02 -0000
> @@ -6590,6 +6590,7 @@
>          if (h->deblocking_filter==2 && h->slice_table[mbm_xy] != h->slice_table[mb_xy])
>              start = 1;
>  
> +        {
>          const int edges = ((mb_type & mbm_type) & (MB_TYPE_16x16|MB_TYPE_SKIP))
>                                                 == (MB_TYPE_16x16|MB_TYPE_SKIP) ? 1 : 4;
>          // how often to recheck mv-based bS when iterating between edges
> @@ -6755,6 +6756,7 @@
>                  }
>              }
>          }
> +        }
>      }
>  }
>  

A simpler and cleaner fix would be to move the line
          const int edges = ((mb_type & mbm_type) &
(MB_TYPE_16x16|MB_TYPE_SKIP))
                                                 ==
(MB_TYPE_16x16|MB_TYPE_SKIP) ? 1 : 4;

before the "start = 1".

I've not tested it though, but that seems a more resonable solution.

Guillaume





More information about the ffmpeg-devel mailing list