On Wed, Jul 23, 2014 at 08:47:59AM +0100, Vittorio Giovara wrote:
> On Mon, Jul 21, 2014 at 8:43 PM, Anton Khirnov <an...@khirnov.net> wrote:
> >
> > On Sun, 20 Jul 2014 23:59:17 +0100, Vittorio Giovara 
> > <vittorio.giov...@gmail.com> wrote:
> >> @@ -256,6 +256,7 @@ enum AVPixelFormat {
> >>  #define AV_PIX_FMT_XYZ12      AV_PIX_FMT_NE(XYZ12BE, XYZ12LE)
> >>  #define AV_PIX_FMT_NV20       AV_PIX_FMT_NE(NV20BE,  NV20LE)
> >>
> >> +#define AV_PIX_FMT_Y400A      AV_PIX_FMT_GRAY8A
> >>
> >
> > Why make it a macro instead of an additional enum value?
> >
> > Also, missing APIchanges entry.
> 
> if i do (before AV_PIX_FMT_NB)
> +    AV_PIX_FMT_Y400A  =    AV_PIX_FMT_GRAY8A,
> and
> -#define AV_PIX_FMT_Y400A      AV_PIX_FMT_GRAY8A
> 
> i get several errors in swscale when compiling with clang
> 
> libswscale/utils.c:95:6: error: array designator index (119) exceeds array
>       bounds (67)
>     [AV_PIX_FMT_YVYU422]     = { 1, 1 },
>      ^~~~~~~~~~~~~~~~~~
> 
> Shoudl I put it after AV_PIX_FMT_NB? (if I do the error disappears)

That happens because if you don't specify value it would be previous enum
value plus one (see 6.7.2.2p3). So the only good place to add it is right
immediately after AV_PIX_FMT_GRAY8A.

(And this rename still looks uncalled for)
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to