On Wed,  2 Sep 2015 14:32:06 +0200
Vittorio Giovara <[email protected]> wrote:

> ---
> 
> This patch contains offset_plus1->offset.
> Vittorio
> 
>  doc/APIchanges      |   2 +
>  libavutil/pixdesc.c | 708 
> ++++++++++++++++++++++++++--------------------------
>  libavutil/pixdesc.h |   7 +-
>  3 files changed, 361 insertions(+), 356 deletions(-)
> 
> diff --git a/doc/APIchanges b/doc/APIchanges
> index 2e31ab1..133c29c 100644
> --- a/doc/APIchanges
> +++ b/doc/APIchanges
> @@ -16,6 +16,8 @@ API changes, most recent first:
>  2015-xx-xx - lavu 54.0.0
>    xxxxxxx - Change type of AVPixFmtDescriptor.flags.
>    xxxxxxx - Change type of AVComponentDescriptor fields and drop bit packing.
> +  xxxxxxx - Add step, offset, and depth to AVComponentDescriptor to replace
> +            the deprecated step_minus1, offset_plus1, and depth_minus1.
>  
>  2015-xx-xx - lavu 54.17.0
>    xxxxxxx -  Add av_blowfish_alloc().
> diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c
> index 585e408..14f84d7 100644
> --- a/libavutil/pixdesc.c
> +++ b/libavutil/pixdesc.c
> @@ -45,7 +45,7 @@ void av_read_image_line(uint16_t *dst,
>      int flags = desc->flags;
>  
>      if (flags & AV_PIX_FMT_FLAG_BITSTREAM) {
> -        int skip = x * step + comp.offset_plus1 - 1;
> +        int skip = x * step + comp.offset;
>          const uint8_t *p = data[plane] + y * linesize[plane] + (skip >> 3);
>          int shift = 8 - depth - (skip & 7);
>  
> @@ -60,7 +60,7 @@ void av_read_image_line(uint16_t *dst,
>          }
>      } else {
>          const uint8_t *p = data[plane] + y * linesize[plane] +
> -                           x * step + comp.offset_plus1 - 1;
> +                           x * step + comp.offset;
>          int is_8bit = shift + depth <= 8;
>  
>          if (is_8bit)
> @@ -90,7 +90,7 @@ void av_write_image_line(const uint16_t *src,
>      int flags = desc->flags;
>  
>      if (flags & AV_PIX_FMT_FLAG_BITSTREAM) {
> -        int skip = x * step + comp.offset_plus1 - 1;
> +        int skip = x * step + comp.offset;
>          uint8_t *p = data[plane] + y * linesize[plane] + (skip >> 3);
>          int shift = 8 - depth - (skip & 7);
>  
> @@ -103,7 +103,7 @@ void av_write_image_line(const uint16_t *src,
>      } else {
>          int shift = comp.shift;
>          uint8_t *p = data[plane] + y * linesize[plane] +
> -                     x * step + comp.offset_plus1 - 1;
> +                     x * step + comp.offset;
>  
>          if (shift + depth <= 8) {
>              p += !!(flags & AV_PIX_FMT_FLAG_BE);
> @@ -136,9 +136,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 1,
>          .log2_chroma_h = 1,
>          .comp = {
> -            { 0, 1, 1, 0, 8, 0, 7 },        /* Y */
> -            { 1, 1, 1, 0, 8, 0, 7 },        /* U */
> -            { 2, 1, 1, 0, 8, 0, 7 },        /* V */
> +            { 0, 1, 0, 0, 8, 0, 7, 1 },        /* Y */
> +            { 1, 1, 0, 0, 8, 0, 7, 1 },        /* U */
> +            { 2, 1, 0, 0, 8, 0, 7, 1 },        /* V */
>          },
>          .flags = AV_PIX_FMT_FLAG_PLANAR,
>      },
> @@ -148,9 +148,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 1,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 2, 1, 0, 8, 1, 7 },        /* Y */
> -            { 0, 4, 2, 0, 8, 3, 7 },        /* U */
> -            { 0, 4, 4, 0, 8, 3, 7 },        /* V */
> +            { 0, 2, 0, 0, 8, 1, 7, 1 },        /* Y */
> +            { 0, 4, 1, 0, 8, 3, 7, 2 },        /* U */
> +            { 0, 4, 3, 0, 8, 3, 7, 4 },        /* V */
>          },
>      },
>      [AV_PIX_FMT_YVYU422] = {
> @@ -159,9 +159,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 1,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 2, 1, 0, 8, 1, 7 },        /* Y */
> -            { 0, 4, 2, 0, 8, 3, 7 },        /* V */
> -            { 0, 4, 4, 0, 8, 3, 7 },        /* U */
> +            { 0, 2, 0, 0, 8, 1, 7, 1 },        /* Y */
> +            { 0, 4, 1, 0, 8, 3, 7, 2 },        /* V */
> +            { 0, 4, 3, 0, 8, 3, 7, 4 },        /* U */
>          },
>      },
>      [AV_PIX_FMT_RGB24] = {
> @@ -170,9 +170,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 3, 1, 0, 8, 2, 7 },        /* R */
> -            { 0, 3, 2, 0, 8, 2, 7 },        /* G */
> -            { 0, 3, 3, 0, 8, 2, 7 },        /* B */
> +            { 0, 3, 0, 0, 8, 2, 7, 1 },        /* R */
> +            { 0, 3, 1, 0, 8, 2, 7, 2 },        /* G */
> +            { 0, 3, 2, 0, 8, 2, 7, 3 },        /* B */
>          },
>          .flags = AV_PIX_FMT_FLAG_RGB,
>      },
> @@ -182,9 +182,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 3, 1, 0, 8, 2, 7 },        /* B */
> -            { 0, 3, 2, 0, 8, 2, 7 },        /* G */
> -            { 0, 3, 3, 0, 8, 2, 7 },        /* R */
> +            { 0, 3, 0, 0, 8, 2, 7, 1 },        /* B */
> +            { 0, 3, 1, 0, 8, 2, 7, 2 },        /* G */
> +            { 0, 3, 2, 0, 8, 2, 7, 3 },        /* R */
>          },
>          .flags = AV_PIX_FMT_FLAG_RGB,
>      },
> @@ -194,9 +194,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 1,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 1, 1, 0, 8, 0, 7 },        /* Y */
> -            { 1, 1, 1, 0, 8, 0, 7 },        /* U */
> -            { 2, 1, 1, 0, 8, 0, 7 },        /* V */
> +            { 0, 1, 0, 0, 8, 0, 7, 1 },        /* Y */
> +            { 1, 1, 0, 0, 8, 0, 7, 1 },        /* U */
> +            { 2, 1, 0, 0, 8, 0, 7, 1 },        /* V */
>          },
>          .flags = AV_PIX_FMT_FLAG_PLANAR,
>      },
> @@ -206,9 +206,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 1, 1, 0, 8, 0, 7 },        /* Y */
> -            { 1, 1, 1, 0, 8, 0, 7 },        /* U */
> -            { 2, 1, 1, 0, 8, 0, 7 },        /* V */
> +            { 0, 1, 0, 0, 8, 0, 7, 1 },        /* Y */
> +            { 1, 1, 0, 0, 8, 0, 7, 1 },        /* U */
> +            { 2, 1, 0, 0, 8, 0, 7, 1 },        /* V */
>          },
>          .flags = AV_PIX_FMT_FLAG_PLANAR,
>      },
> @@ -218,9 +218,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 2,
>          .log2_chroma_h = 2,
>          .comp = {
> -            { 0, 1, 1, 0, 8, 0, 7 },        /* Y */
> -            { 1, 1, 1, 0, 8, 0, 7 },        /* U */
> -            { 2, 1, 1, 0, 8, 0, 7 },        /* V */
> +            { 0, 1, 0, 0, 8, 0, 7, 1 },        /* Y */
> +            { 1, 1, 0, 0, 8, 0, 7, 1 },        /* U */
> +            { 2, 1, 0, 0, 8, 0, 7, 1 },        /* V */
>          },
>          .flags = AV_PIX_FMT_FLAG_PLANAR,
>      },
> @@ -230,9 +230,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 2,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 1, 1, 0, 8, 0, 7 },        /* Y */
> -            { 1, 1, 1, 0, 8, 0, 7 },        /* U */
> -            { 2, 1, 1, 0, 8, 0, 7 },        /* V */
> +            { 0, 1, 0, 0, 8, 0, 7, 1 },        /* Y */
> +            { 1, 1, 0, 0, 8, 0, 7, 1 },        /* U */
> +            { 2, 1, 0, 0, 8, 0, 7, 1 },        /* V */
>          },
>          .flags = AV_PIX_FMT_FLAG_PLANAR,
>      },
> @@ -242,7 +242,7 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 1, 1, 0, 8, 0, 7 },        /* Y */
> +            { 0, 1, 0, 0, 8, 0, 7, 1 },        /* Y */
>          },
>          .flags = AV_PIX_FMT_FLAG_PSEUDOPAL,
>          .alias = "gray8,y8",
> @@ -253,7 +253,7 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 1, 1, 0, 1, 0, 7 },        /* Y */
> +            { 0, 1, 0, 0, 1, 0, 7, 1 },        /* Y */
>          },
>          .flags = AV_PIX_FMT_FLAG_BITSTREAM,
>      },
> @@ -263,7 +263,7 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 1, 1, 7, 1, 0, 7 },        /* Y */
> +            { 0, 1, 0, 7, 1, 0, 7, 1 },        /* Y */
>          },
>          .flags = AV_PIX_FMT_FLAG_BITSTREAM,
>      },
> @@ -273,7 +273,7 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 1, 1, 0, 8, 0, 7 },
> +            { 0, 1, 0, 0, 8, 0, 7, 1 },
>          },
>          .flags = AV_PIX_FMT_FLAG_PAL,
>      },
> @@ -283,9 +283,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 1,
>          .log2_chroma_h = 1,
>          .comp = {
> -            { 0, 1, 1, 0, 8, 0, 7 },        /* Y */
> -            { 1, 1, 1, 0, 8, 0, 7 },        /* U */
> -            { 2, 1, 1, 0, 8, 0, 7 },        /* V */
> +            { 0, 1, 0, 0, 8, 0, 7, 1 },        /* Y */
> +            { 1, 1, 0, 0, 8, 0, 7, 1 },        /* U */
> +            { 2, 1, 0, 0, 8, 0, 7, 1 },        /* V */
>          },
>          .flags = AV_PIX_FMT_FLAG_PLANAR,
>      },
> @@ -295,9 +295,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 1,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 1, 1, 0, 8, 0, 7 },        /* Y */
> -            { 1, 1, 1, 0, 8, 0, 7 },        /* U */
> -            { 2, 1, 1, 0, 8, 0, 7 },        /* V */
> +            { 0, 1, 0, 0, 8, 0, 7, 1 },        /* Y */
> +            { 1, 1, 0, 0, 8, 0, 7, 1 },        /* U */
> +            { 2, 1, 0, 0, 8, 0, 7, 1 },        /* V */
>          },
>          .flags = AV_PIX_FMT_FLAG_PLANAR,
>      },
> @@ -307,9 +307,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 1, 1, 0, 8, 0, 7 },        /* Y */
> -            { 1, 1, 1, 0, 8, 0, 7 },        /* U */
> -            { 2, 1, 1, 0, 8, 0, 7 },        /* V */
> +            { 0, 1, 0, 0, 8, 0, 7, 1 },        /* Y */
> +            { 1, 1, 0, 0, 8, 0, 7, 1 },        /* U */
> +            { 2, 1, 0, 0, 8, 0, 7, 1 },        /* V */
>          },
>          .flags = AV_PIX_FMT_FLAG_PLANAR,
>      },
> @@ -329,9 +329,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 1,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 2, 2, 0, 8, 1, 7 },        /* Y */
> -            { 0, 4, 1, 0, 8, 3, 7 },        /* U */
> -            { 0, 4, 3, 0, 8, 3, 7 },        /* V */
> +            { 0, 2, 1, 0, 8, 1, 7, 2 },        /* Y */
> +            { 0, 4, 0, 0, 8, 3, 7, 1 },        /* U */
> +            { 0, 4, 2, 0, 8, 3, 7, 3 },        /* V */
>          },
>      },
>      [AV_PIX_FMT_UYYVYY411] = {
> @@ -340,9 +340,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 2,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 4, 2, 0, 8, 3, 7 },        /* Y */
> -            { 0, 6, 1, 0, 8, 5, 7 },        /* U */
> -            { 0, 6, 4, 0, 8, 5, 7 },        /* V */
> +            { 0, 4, 1, 0, 8, 3, 7, 2 },        /* Y */
> +            { 0, 6, 0, 0, 8, 5, 7, 1 },        /* U */
> +            { 0, 6, 3, 0, 8, 5, 7, 4 },        /* V */
>          },
>      },
>      [AV_PIX_FMT_BGR8] = {
> @@ -351,9 +351,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 1, 1, 6, 2, 0, 1 },        /* B */
> -            { 0, 1, 1, 3, 3, 0, 2 },        /* G */
> -            { 0, 1, 1, 0, 3, 0, 2 },        /* R */
> +            { 0, 1, 0, 6, 2, 0, 1, 1 },        /* B */
> +            { 0, 1, 0, 3, 3, 0, 2, 1 },        /* G */
> +            { 0, 1, 0, 0, 3, 0, 2, 1 },        /* R */
>          },
>          .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_PSEUDOPAL,
>      },
> @@ -363,9 +363,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 4, 1, 0, 1, 3, 0 },        /* B */
> -            { 0, 4, 2, 0, 2, 3, 1 },        /* G */
> -            { 0, 4, 4, 0, 1, 3, 0 },        /* R */
> +            { 0, 4, 0, 0, 1, 3, 0, 1 },        /* B */
> +            { 0, 4, 1, 0, 2, 3, 1, 2 },        /* G */
> +            { 0, 4, 3, 0, 1, 3, 0, 4 },        /* R */
>          },
>          .flags = AV_PIX_FMT_FLAG_BITSTREAM | AV_PIX_FMT_FLAG_RGB,
>      },
> @@ -375,9 +375,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 1, 1, 3, 1, 0, 0 },        /* B */
> -            { 0, 1, 1, 1, 2, 0, 1 },        /* G */
> -            { 0, 1, 1, 0, 1, 0, 0 },        /* R */
> +            { 0, 1, 0, 3, 1, 0, 0, 1 },        /* B */
> +            { 0, 1, 0, 1, 2, 0, 1, 1 },        /* G */
> +            { 0, 1, 0, 0, 1, 0, 0, 1 },        /* R */
>          },
>          .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_PSEUDOPAL,
>      },
> @@ -387,9 +387,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 1, 1, 6, 2, 0, 1 },        /* R */
> -            { 0, 1, 1, 3, 3, 0, 2 },        /* G */
> -            { 0, 1, 1, 0, 3, 0, 2 },        /* B */
> +            { 0, 1, 0, 6, 2, 0, 1, 1 },        /* R */
> +            { 0, 1, 0, 3, 3, 0, 2, 1 },        /* G */
> +            { 0, 1, 0, 0, 3, 0, 2, 1 },        /* B */
>          },
>          .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_PSEUDOPAL,
>      },
> @@ -399,9 +399,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 4, 1, 0, 1, 3, 0 },        /* R */
> -            { 0, 4, 2, 0, 2, 3, 1 },        /* G */
> -            { 0, 4, 4, 0, 1, 3, 0 },        /* B */
> +            { 0, 4, 0, 0, 1, 3, 0, 1 },        /* R */
> +            { 0, 4, 1, 0, 2, 3, 1, 2 },        /* G */
> +            { 0, 4, 3, 0, 1, 3, 0, 4 },        /* B */
>          },
>          .flags = AV_PIX_FMT_FLAG_BITSTREAM | AV_PIX_FMT_FLAG_RGB,
>      },
> @@ -411,9 +411,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 1, 1, 3, 1, 0, 0 },        /* R */
> -            { 0, 1, 1, 1, 2, 0, 1 },        /* G */
> -            { 0, 1, 1, 0, 1, 0, 0 },        /* B */
> +            { 0, 1, 0, 3, 1, 0, 0, 1 },        /* R */
> +            { 0, 1, 0, 1, 2, 0, 1, 1 },        /* G */
> +            { 0, 1, 0, 0, 1, 0, 0, 1 },        /* B */
>          },
>          .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_PSEUDOPAL,
>      },
> @@ -423,9 +423,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 1,
>          .log2_chroma_h = 1,
>          .comp = {
> -            { 0, 1, 1, 0, 8, 0, 7 },        /* Y */
> -            { 1, 2, 1, 0, 8, 1, 7 },        /* U */
> -            { 1, 2, 2, 0, 8, 1, 7 },        /* V */
> +            { 0, 1, 0, 0, 8, 0, 7, 1 },        /* Y */
> +            { 1, 2, 0, 0, 8, 1, 7, 1 },        /* U */
> +            { 1, 2, 1, 0, 8, 1, 7, 2 },        /* V */
>          },
>          .flags = AV_PIX_FMT_FLAG_PLANAR,
>      },
> @@ -435,9 +435,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 1,
>          .log2_chroma_h = 1,
>          .comp = {
> -            { 0, 1, 1, 0, 8, 0, 7 },        /* Y */
> -            { 1, 2, 1, 0, 8, 1, 7 },        /* V */
> -            { 1, 2, 2, 0, 8, 1, 7 },        /* U */
> +            { 0, 1, 0, 0, 8, 0, 7, 1 },        /* Y */
> +            { 1, 2, 0, 0, 8, 1, 7, 1 },        /* V */
> +            { 1, 2, 1, 0, 8, 1, 7, 2 },        /* U */
>          },
>          .flags = AV_PIX_FMT_FLAG_PLANAR,
>      },
> @@ -447,10 +447,10 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 4, 1, 0, 8, 3, 7 },        /* A */
> -            { 0, 4, 2, 0, 8, 3, 7 },        /* R */
> -            { 0, 4, 3, 0, 8, 3, 7 },        /* G */
> -            { 0, 4, 4, 0, 8, 3, 7 },        /* B */
> +            { 0, 4, 0, 0, 8, 3, 7, 1 },        /* A */
> +            { 0, 4, 1, 0, 8, 3, 7, 2 },        /* R */
> +            { 0, 4, 2, 0, 8, 3, 7, 3 },        /* G */
> +            { 0, 4, 3, 0, 8, 3, 7, 4 },        /* B */
>          },
>          .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA,
>      },
> @@ -460,10 +460,10 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 4, 1, 0, 8, 3, 7 },        /* R */
> -            { 0, 4, 2, 0, 8, 3, 7 },        /* G */
> -            { 0, 4, 3, 0, 8, 3, 7 },        /* B */
> -            { 0, 4, 4, 0, 8, 3, 7 },        /* A */
> +            { 0, 4, 0, 0, 8, 3, 7, 1 },        /* R */
> +            { 0, 4, 1, 0, 8, 3, 7, 2 },        /* G */
> +            { 0, 4, 2, 0, 8, 3, 7, 3 },        /* B */
> +            { 0, 4, 3, 0, 8, 3, 7, 4 },        /* A */
>          },
>          .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA,
>      },
> @@ -473,10 +473,10 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 4, 1, 0, 8, 3, 7 },        /* A */
> -            { 0, 4, 2, 0, 8, 3, 7 },        /* B */
> -            { 0, 4, 3, 0, 8, 3, 7 },        /* G */
> -            { 0, 4, 4, 0, 8, 3, 7 },        /* R */
> +            { 0, 4, 0, 0, 8, 3, 7, 1 },        /* A */
> +            { 0, 4, 1, 0, 8, 3, 7, 2 },        /* B */
> +            { 0, 4, 2, 0, 8, 3, 7, 3 },        /* G */
> +            { 0, 4, 3, 0, 8, 3, 7, 4 },        /* R */
>          },
>          .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA,
>      },
> @@ -486,10 +486,10 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 4, 1, 0, 8, 3, 7 },        /* B */
> -            { 0, 4, 2, 0, 8, 3, 7 },        /* G */
> -            { 0, 4, 3, 0, 8, 3, 7 },        /* R */
> -            { 0, 4, 4, 0, 8, 3, 7 },        /* A */
> +            { 0, 4, 0, 0, 8, 3, 7, 1 },        /* B */
> +            { 0, 4, 1, 0, 8, 3, 7, 2 },        /* G */
> +            { 0, 4, 2, 0, 8, 3, 7, 3 },        /* R */
> +            { 0, 4, 3, 0, 8, 3, 7, 4 },        /* A */
>          },
>          .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA,
>      },
> @@ -499,7 +499,7 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 2, 1, 0, 16, 1, 15 },       /* Y */
> +            { 0, 2, 0, 0, 16, 1, 15, 1 },       /* Y */
>          },
>          .flags = AV_PIX_FMT_FLAG_BE,
>          .alias = "y16be",
> @@ -510,7 +510,7 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 2, 1, 0, 16, 1, 15 },       /* Y */
> +            { 0, 2, 0, 0, 16, 1, 15, 1 },       /* Y */
>          },
>          .alias = "y16le",
>      },
> @@ -520,9 +520,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 1,
>          .comp = {
> -            { 0, 1, 1, 0, 8, 0, 7 },        /* Y */
> -            { 1, 1, 1, 0, 8, 0, 7 },        /* U */
> -            { 2, 1, 1, 0, 8, 0, 7 },        /* V */
> +            { 0, 1, 0, 0, 8, 0, 7, 1 },        /* Y */
> +            { 1, 1, 0, 0, 8, 0, 7, 1 },        /* U */
> +            { 2, 1, 0, 0, 8, 0, 7, 1 },        /* V */
>          },
>          .flags = AV_PIX_FMT_FLAG_PLANAR,
>      },
> @@ -532,9 +532,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 1,
>          .comp = {
> -            { 0, 1, 1, 0, 8, 0, 7 },        /* Y */
> -            { 1, 1, 1, 0, 8, 0, 7 },        /* U */
> -            { 2, 1, 1, 0, 8, 0, 7 },        /* V */
> +            { 0, 1, 0, 0, 8, 0, 7, 1 },        /* Y */
> +            { 1, 1, 0, 0, 8, 0, 7, 1 },        /* U */
> +            { 2, 1, 0, 0, 8, 0, 7, 1 },        /* V */
>          },
>          .flags = AV_PIX_FMT_FLAG_PLANAR,
>      },
> @@ -544,10 +544,10 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 1,
>          .log2_chroma_h = 1,
>          .comp = {
> -            { 0, 1, 1, 0, 8, 0, 7 },        /* Y */
> -            { 1, 1, 1, 0, 8, 0, 7 },        /* U */
> -            { 2, 1, 1, 0, 8, 0, 7 },        /* V */
> -            { 3, 1, 1, 0, 8, 0, 7 },        /* A */
> +            { 0, 1, 0, 0, 8, 0, 7, 1 },        /* Y */
> +            { 1, 1, 0, 0, 8, 0, 7, 1 },        /* U */
> +            { 2, 1, 0, 0, 8, 0, 7, 1 },        /* V */
> +            { 3, 1, 0, 0, 8, 0, 7, 1 },        /* A */
>          },
>          .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
>      },
> @@ -557,10 +557,10 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 1,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 1, 1, 0, 8, 0, 7 },        /* Y */
> -            { 1, 1, 1, 0, 8, 0, 7 },        /* U */
> -            { 2, 1, 1, 0, 8, 0, 7 },        /* V */
> -            { 3, 1, 1, 0, 8, 0, 7 },        /* A */
> +            { 0, 1, 0, 0, 8, 0, 7, 1 },        /* Y */
> +            { 1, 1, 0, 0, 8, 0, 7, 1 },        /* U */
> +            { 2, 1, 0, 0, 8, 0, 7, 1 },        /* V */
> +            { 3, 1, 0, 0, 8, 0, 7, 1 },        /* A */
>          },
>          .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
>      },
> @@ -570,10 +570,10 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 1, 1, 0, 8, 0, 7 },        /* Y */
> -            { 1, 1, 1, 0, 8, 0, 7 },        /* U */
> -            { 2, 1, 1, 0, 8, 0, 7 },        /* V */
> -            { 3, 1, 1, 0, 8, 0, 7 },        /* A */
> +            { 0, 1, 0, 0, 8, 0, 7, 1 },        /* Y */
> +            { 1, 1, 0, 0, 8, 0, 7, 1 },        /* U */
> +            { 2, 1, 0, 0, 8, 0, 7, 1 },        /* V */
> +            { 3, 1, 0, 0, 8, 0, 7, 1 },        /* A */
>          },
>          .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
>      },
> @@ -583,10 +583,10 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 1,
>          .log2_chroma_h = 1,
>          .comp = {
> -            { 0, 2, 1, 0, 9, 1, 8 },        /* Y */
> -            { 1, 2, 1, 0, 9, 1, 8 },        /* U */
> -            { 2, 2, 1, 0, 9, 1, 8 },        /* V */
> -            { 3, 2, 1, 0, 9, 1, 8 },        /* A */
> +            { 0, 2, 0, 0, 9, 1, 8, 1 },        /* Y */
> +            { 1, 2, 0, 0, 9, 1, 8, 1 },        /* U */
> +            { 2, 2, 0, 0, 9, 1, 8, 1 },        /* V */
> +            { 3, 2, 0, 0, 9, 1, 8, 1 },        /* A */
>          },
>          .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR,
>      },
> @@ -596,10 +596,10 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 1,
>          .log2_chroma_h = 1,
>          .comp = {
> -            { 0, 2, 1, 0, 9, 1, 8 },        /* Y */
> -            { 1, 2, 1, 0, 9, 1, 8 },        /* U */
> -            { 2, 2, 1, 0, 9, 1, 8 },        /* V */
> -            { 3, 2, 1, 0, 9, 1, 8 },        /* A */
> +            { 0, 2, 0, 0, 9, 1, 8, 1 },        /* Y */
> +            { 1, 2, 0, 0, 9, 1, 8, 1 },        /* U */
> +            { 2, 2, 0, 0, 9, 1, 8, 1 },        /* V */
> +            { 3, 2, 0, 0, 9, 1, 8, 1 },        /* A */
>          },
>          .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
>      },
> @@ -609,10 +609,10 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 1,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 2, 1, 0, 9, 1, 8 },        /* Y */
> -            { 1, 2, 1, 0, 9, 1, 8 },        /* U */
> -            { 2, 2, 1, 0, 9, 1, 8 },        /* V */
> -            { 3, 2, 1, 0, 9, 1, 8 },        /* A */
> +            { 0, 2, 0, 0, 9, 1, 8, 1 },        /* Y */
> +            { 1, 2, 0, 0, 9, 1, 8, 1 },        /* U */
> +            { 2, 2, 0, 0, 9, 1, 8, 1 },        /* V */
> +            { 3, 2, 0, 0, 9, 1, 8, 1 },        /* A */
>          },
>          .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | 
> AV_PIX_FMT_FLAG_ALPHA,
>      },
> @@ -622,10 +622,10 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 1,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 2, 1, 0, 9, 1, 8 },        /* Y */
> -            { 1, 2, 1, 0, 9, 1, 8 },        /* U */
> -            { 2, 2, 1, 0, 9, 1, 8 },        /* V */
> -            { 3, 2, 1, 0, 9, 1, 8 },        /* A */
> +            { 0, 2, 0, 0, 9, 1, 8, 1 },        /* Y */
> +            { 1, 2, 0, 0, 9, 1, 8, 1 },        /* U */
> +            { 2, 2, 0, 0, 9, 1, 8, 1 },        /* V */
> +            { 3, 2, 0, 0, 9, 1, 8, 1 },        /* A */
>          },
>          .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
>      },
> @@ -635,10 +635,10 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 2, 1, 0, 9, 1, 8 },        /* Y */
> -            { 1, 2, 1, 0, 9, 1, 8 },        /* U */
> -            { 2, 2, 1, 0, 9, 1, 8 },        /* V */
> -            { 3, 2, 1, 0, 9, 1, 8 },        /* A */
> +            { 0, 2, 0, 0, 9, 1, 8, 1 },        /* Y */
> +            { 1, 2, 0, 0, 9, 1, 8, 1 },        /* U */
> +            { 2, 2, 0, 0, 9, 1, 8, 1 },        /* V */
> +            { 3, 2, 0, 0, 9, 1, 8, 1 },        /* A */
>          },
>          .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | 
> AV_PIX_FMT_FLAG_ALPHA,
>      },
> @@ -648,10 +648,10 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 2, 1, 0, 9, 1, 8 },        /* Y */
> -            { 1, 2, 1, 0, 9, 1, 8 },        /* U */
> -            { 2, 2, 1, 0, 9, 1, 8 },        /* V */
> -            { 3, 2, 1, 0, 9, 1, 8 },        /* A */
> +            { 0, 2, 0, 0, 9, 1, 8, 1 },        /* Y */
> +            { 1, 2, 0, 0, 9, 1, 8, 1 },        /* U */
> +            { 2, 2, 0, 0, 9, 1, 8, 1 },        /* V */
> +            { 3, 2, 0, 0, 9, 1, 8, 1 },        /* A */
>          },
>          .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
>      },
> @@ -661,10 +661,10 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 1,
>          .log2_chroma_h = 1,
>          .comp = {
> -            { 0, 2, 1, 0, 10, 1, 9 },        /* Y */
> -            { 1, 2, 1, 0, 10, 1, 9 },        /* U */
> -            { 2, 2, 1, 0, 10, 1, 9 },        /* V */
> -            { 3, 2, 1, 0, 10, 1, 9 },        /* A */
> +            { 0, 2, 0, 0, 10, 1, 9, 1 },        /* Y */
> +            { 1, 2, 0, 0, 10, 1, 9, 1 },        /* U */
> +            { 2, 2, 0, 0, 10, 1, 9, 1 },        /* V */
> +            { 3, 2, 0, 0, 10, 1, 9, 1 },        /* A */
>          },
>          .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | 
> AV_PIX_FMT_FLAG_ALPHA,
>      },
> @@ -674,10 +674,10 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 1,
>          .log2_chroma_h = 1,
>          .comp = {
> -            { 0, 2, 1, 0, 10, 1, 9 },        /* Y */
> -            { 1, 2, 1, 0, 10, 1, 9 },        /* U */
> -            { 2, 2, 1, 0, 10, 1, 9 },        /* V */
> -            { 3, 2, 1, 0, 10, 1, 9 },        /* A */
> +            { 0, 2, 0, 0, 10, 1, 9, 1 },        /* Y */
> +            { 1, 2, 0, 0, 10, 1, 9, 1 },        /* U */
> +            { 2, 2, 0, 0, 10, 1, 9, 1 },        /* V */
> +            { 3, 2, 0, 0, 10, 1, 9, 1 },        /* A */
>          },
>          .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
>      },
> @@ -687,10 +687,10 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 1,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 2, 1, 0, 10, 1, 9 },        /* Y */
> -            { 1, 2, 1, 0, 10, 1, 9 },        /* U */
> -            { 2, 2, 1, 0, 10, 1, 9 },        /* V */
> -            { 3, 2, 1, 0, 10, 1, 9 },        /* A */
> +            { 0, 2, 0, 0, 10, 1, 9, 1 },        /* Y */
> +            { 1, 2, 0, 0, 10, 1, 9, 1 },        /* U */
> +            { 2, 2, 0, 0, 10, 1, 9, 1 },        /* V */
> +            { 3, 2, 0, 0, 10, 1, 9, 1 },        /* A */
>          },
>          .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | 
> AV_PIX_FMT_FLAG_ALPHA,
>      },
> @@ -700,10 +700,10 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 1,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 2, 1, 0, 10, 1, 9 },        /* Y */
> -            { 1, 2, 1, 0, 10, 1, 9 },        /* U */
> -            { 2, 2, 1, 0, 10, 1, 9 },        /* V */
> -            { 3, 2, 1, 0, 10, 1, 9 },        /* A */
> +            { 0, 2, 0, 0, 10, 1, 9, 1 },        /* Y */
> +            { 1, 2, 0, 0, 10, 1, 9, 1 },        /* U */
> +            { 2, 2, 0, 0, 10, 1, 9, 1 },        /* V */
> +            { 3, 2, 0, 0, 10, 1, 9, 1 },        /* A */
>          },
>          .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
>      },
> @@ -713,10 +713,10 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 2, 1, 0, 10, 1, 9 },        /* Y */
> -            { 1, 2, 1, 0, 10, 1, 9 },        /* U */
> -            { 2, 2, 1, 0, 10, 1, 9 },        /* V */
> -            { 3, 2, 1, 0, 10, 1, 9 },        /* A */
> +            { 0, 2, 0, 0, 10, 1, 9, 1 },        /* Y */
> +            { 1, 2, 0, 0, 10, 1, 9, 1 },        /* U */
> +            { 2, 2, 0, 0, 10, 1, 9, 1 },        /* V */
> +            { 3, 2, 0, 0, 10, 1, 9, 1 },        /* A */
>          },
>          .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | 
> AV_PIX_FMT_FLAG_ALPHA,
>      },
> @@ -726,10 +726,10 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 2, 1, 0, 10, 1, 9 },        /* Y */
> -            { 1, 2, 1, 0, 10, 1, 9 },        /* U */
> -            { 2, 2, 1, 0, 10, 1, 9 },        /* V */
> -            { 3, 2, 1, 0, 10, 1, 9 },        /* A */
> +            { 0, 2, 0, 0, 10, 1, 9, 1 },        /* Y */
> +            { 1, 2, 0, 0, 10, 1, 9, 1 },        /* U */
> +            { 2, 2, 0, 0, 10, 1, 9, 1 },        /* V */
> +            { 3, 2, 0, 0, 10, 1, 9, 1 },        /* A */
>          },
>          .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
>      },
> @@ -739,10 +739,10 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 1,
>          .log2_chroma_h = 1,
>          .comp = {
> -            { 0, 2, 1, 0, 16, 1, 15 },        /* Y */
> -            { 1, 2, 1, 0, 16, 1, 15 },        /* U */
> -            { 2, 2, 1, 0, 16, 1, 15 },        /* V */
> -            { 3, 2, 1, 0, 16, 1, 15 },        /* A */
> +            { 0, 2, 0, 0, 16, 1, 15, 1 },        /* Y */
> +            { 1, 2, 0, 0, 16, 1, 15, 1 },        /* U */
> +            { 2, 2, 0, 0, 16, 1, 15, 1 },        /* V */
> +            { 3, 2, 0, 0, 16, 1, 15, 1 },        /* A */
>          },
>          .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | 
> AV_PIX_FMT_FLAG_ALPHA,
>      },
> @@ -752,10 +752,10 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 1,
>          .log2_chroma_h = 1,
>          .comp = {
> -            { 0, 2, 1, 0, 16, 1, 15 },        /* Y */
> -            { 1, 2, 1, 0, 16, 1, 15 },        /* U */
> -            { 2, 2, 1, 0, 16, 1, 15 },        /* V */
> -            { 3, 2, 1, 0, 16, 1, 15 },        /* A */
> +            { 0, 2, 0, 0, 16, 1, 15, 1 },        /* Y */
> +            { 1, 2, 0, 0, 16, 1, 15, 1 },        /* U */
> +            { 2, 2, 0, 0, 16, 1, 15, 1 },        /* V */
> +            { 3, 2, 0, 0, 16, 1, 15, 1 },        /* A */
>          },
>          .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
>      },
> @@ -765,10 +765,10 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 1,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 2, 1, 0, 16, 1, 15 },        /* Y */
> -            { 1, 2, 1, 0, 16, 1, 15 },        /* U */
> -            { 2, 2, 1, 0, 16, 1, 15 },        /* V */
> -            { 3, 2, 1, 0, 16, 1, 15 },        /* A */
> +            { 0, 2, 0, 0, 16, 1, 15, 1 },        /* Y */
> +            { 1, 2, 0, 0, 16, 1, 15, 1 },        /* U */
> +            { 2, 2, 0, 0, 16, 1, 15, 1 },        /* V */
> +            { 3, 2, 0, 0, 16, 1, 15, 1 },        /* A */
>          },
>          .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | 
> AV_PIX_FMT_FLAG_ALPHA,
>      },
> @@ -778,10 +778,10 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 1,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 2, 1, 0, 16, 1, 15 },        /* Y */
> -            { 1, 2, 1, 0, 16, 1, 15 },        /* U */
> -            { 2, 2, 1, 0, 16, 1, 15 },        /* V */
> -            { 3, 2, 1, 0, 16, 1, 15 },        /* A */
> +            { 0, 2, 0, 0, 16, 1, 15, 1 },        /* Y */
> +            { 1, 2, 0, 0, 16, 1, 15, 1 },        /* U */
> +            { 2, 2, 0, 0, 16, 1, 15, 1 },        /* V */
> +            { 3, 2, 0, 0, 16, 1, 15, 1 },        /* A */
>          },
>          .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
>      },
> @@ -791,10 +791,10 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 2, 1, 0, 16, 1, 15 },        /* Y */
> -            { 1, 2, 1, 0, 16, 1, 15 },        /* U */
> -            { 2, 2, 1, 0, 16, 1, 15 },        /* V */
> -            { 3, 2, 1, 0, 16, 1, 15 },        /* A */
> +            { 0, 2, 0, 0, 16, 1, 15, 1 },        /* Y */
> +            { 1, 2, 0, 0, 16, 1, 15, 1 },        /* U */
> +            { 2, 2, 0, 0, 16, 1, 15, 1 },        /* V */
> +            { 3, 2, 0, 0, 16, 1, 15, 1 },        /* A */
>          },
>          .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | 
> AV_PIX_FMT_FLAG_ALPHA,
>      },
> @@ -804,10 +804,10 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 2, 1, 0, 16, 1, 15 },        /* Y */
> -            { 1, 2, 1, 0, 16, 1, 15 },        /* U */
> -            { 2, 2, 1, 0, 16, 1, 15 },        /* V */
> -            { 3, 2, 1, 0, 16, 1, 15 },        /* A */
> +            { 0, 2, 0, 0, 16, 1, 15, 1 },        /* Y */
> +            { 1, 2, 0, 0, 16, 1, 15, 1 },        /* U */
> +            { 2, 2, 0, 0, 16, 1, 15, 1 },        /* V */
> +            { 3, 2, 0, 0, 16, 1, 15, 1 },        /* A */
>          },
>          .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
>      },
> @@ -855,9 +855,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 6, 1, 0, 16, 5, 15 },       /* R */
> -            { 0, 6, 3, 0, 16, 5, 15 },       /* G */
> -            { 0, 6, 5, 0, 16, 5, 15 },       /* B */
> +            { 0, 6, 0, 0, 16, 5, 15, 1 },       /* R */
> +            { 0, 6, 2, 0, 16, 5, 15, 3 },       /* G */
> +            { 0, 6, 4, 0, 16, 5, 15, 5 },       /* B */
>          },
>          .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_BE,
>      },
> @@ -867,9 +867,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 6, 1, 0, 16, 5, 15 },       /* R */
> -            { 0, 6, 3, 0, 16, 5, 15 },       /* G */
> -            { 0, 6, 5, 0, 16, 5, 15 },       /* B */
> +            { 0, 6, 0, 0, 16, 5, 15, 1 },       /* R */
> +            { 0, 6, 2, 0, 16, 5, 15, 3 },       /* G */
> +            { 0, 6, 4, 0, 16, 5, 15, 5 },       /* B */
>          },
>          .flags = AV_PIX_FMT_FLAG_RGB,
>      },
> @@ -879,10 +879,10 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 8, 1, 0, 16, 7, 15 },       /* R */
> -            { 0, 8, 3, 0, 16, 7, 15 },       /* G */
> -            { 0, 8, 5, 0, 16, 7, 15 },       /* B */
> -            { 0, 8, 7, 0, 16, 7, 15 },       /* A */
> +            { 0, 8, 0, 0, 16, 7, 15, 1 },       /* R */
> +            { 0, 8, 2, 0, 16, 7, 15, 3 },       /* G */
> +            { 0, 8, 4, 0, 16, 7, 15, 5 },       /* B */
> +            { 0, 8, 6, 0, 16, 7, 15, 7 },       /* A */
>          },
>          .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB | 
> AV_PIX_FMT_FLAG_ALPHA,
>      },
> @@ -892,10 +892,10 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 8, 1, 0, 16, 7, 15 },       /* R */
> -            { 0, 8, 3, 0, 16, 7, 15 },       /* G */
> -            { 0, 8, 5, 0, 16, 7, 15 },       /* B */
> -            { 0, 8, 7, 0, 16, 7, 15 },       /* A */
> +            { 0, 8, 0, 0, 16, 7, 15, 1 },       /* R */
> +            { 0, 8, 2, 0, 16, 7, 15, 3 },       /* G */
> +            { 0, 8, 4, 0, 16, 7, 15, 5 },       /* B */
> +            { 0, 8, 6, 0, 16, 7, 15, 7 },       /* A */
>          },
>          .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA,
>      },
> @@ -905,9 +905,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 2, 0, 3, 5, 1, 4 },        /* R */
> -            { 0, 2, 1, 5, 6, 1, 5 },        /* G */
> -            { 0, 2, 1, 0, 5, 1, 4 },        /* B */
> +            { 0, 2, -1, 3, 5, 1, 4, 0 },        /* R */
> +            { 0, 2,  0, 5, 6, 1, 5, 1 },        /* G */
> +            { 0, 2,  0, 0, 5, 1, 4, 1 },        /* B */
>          },
>          .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB,
>      },
> @@ -917,9 +917,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 2, 2, 3, 5, 1, 4 },        /* R */
> -            { 0, 2, 1, 5, 6, 1, 5 },        /* G */
> -            { 0, 2, 1, 0, 5, 1, 4 },        /* B */
> +            { 0, 2, 1, 3, 5, 1, 4, 2 },        /* R */
> +            { 0, 2, 0, 5, 6, 1, 5, 1 },        /* G */
> +            { 0, 2, 0, 0, 5, 1, 4, 1 },        /* B */
>          },
>          .flags = AV_PIX_FMT_FLAG_RGB,
>      },
> @@ -929,9 +929,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 2, 0, 2, 5, 1, 4 },        /* R */
> -            { 0, 2, 1, 5, 5, 1, 4 },        /* G */
> -            { 0, 2, 1, 0, 5, 1, 4 },        /* B */
> +            { 0, 2, -1, 2, 5, 1, 4, 0 },        /* R */
> +            { 0, 2,  0, 5, 5, 1, 4, 1 },        /* G */
> +            { 0, 2,  0, 0, 5, 1, 4, 1 },        /* B */
>          },
>          .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB,
>      },
> @@ -941,9 +941,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 2, 2, 2, 5, 1, 4 },        /* R */
> -            { 0, 2, 1, 5, 5, 1, 4 },        /* G */
> -            { 0, 2, 1, 0, 5, 1, 4 },        /* B */
> +            { 0, 2, 1, 2, 5, 1, 4, 2 },        /* R */
> +            { 0, 2, 0, 5, 5, 1, 4, 1 },        /* G */
> +            { 0, 2, 0, 0, 5, 1, 4, 1 },        /* B */
>          },
>          .flags = AV_PIX_FMT_FLAG_RGB,
>      },
> @@ -953,9 +953,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 2, 0, 0, 4, 1, 3 },        /* R */
> -            { 0, 2, 1, 4, 4, 1, 3 },        /* G */
> -            { 0, 2, 1, 0, 4, 1, 3 },        /* B */
> +            { 0, 2, -1, 0, 4, 1, 3, 0 },        /* R */
> +            { 0, 2,  0, 4, 4, 1, 3, 1 },        /* G */
> +            { 0, 2,  0, 0, 4, 1, 3, 1 },        /* B */
>          },
>          .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB,
>      },
> @@ -965,9 +965,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 2, 2, 0, 4, 1, 3 },        /* R */
> -            { 0, 2, 1, 4, 4, 1, 3 },        /* G */
> -            { 0, 2, 1, 0, 4, 1, 3 },        /* B */
> +            { 0, 2, 1, 0, 4, 1, 3, 2 },        /* R */
> +            { 0, 2, 0, 4, 4, 1, 3, 1 },        /* G */
> +            { 0, 2, 0, 0, 4, 1, 3, 1 },        /* B */
>          },
>          .flags = AV_PIX_FMT_FLAG_RGB,
>      },
> @@ -977,9 +977,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 6, 1, 0, 16, 5, 15 },       /* B */
> -            { 0, 6, 3, 0, 16, 5, 15 },       /* G */
> -            { 0, 6, 5, 0, 16, 5, 15 },       /* R */
> +            { 0, 6, 0, 0, 16, 5, 15, 1 },       /* B */
> +            { 0, 6, 2, 0, 16, 5, 15, 3 },       /* G */
> +            { 0, 6, 4, 0, 16, 5, 15, 5 },       /* R */
>          },
>          .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB,
>      },
> @@ -989,9 +989,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 6, 1, 0, 16, 5, 15 },       /* B */
> -            { 0, 6, 3, 0, 16, 5, 15 },       /* G */
> -            { 0, 6, 5, 0, 16, 5, 15 },       /* R */
> +            { 0, 6, 0, 0, 16, 5, 15, 1 },       /* B */
> +            { 0, 6, 2, 0, 16, 5, 15, 3 },       /* G */
> +            { 0, 6, 4, 0, 16, 5, 15, 5 },       /* R */
>          },
>          .flags = AV_PIX_FMT_FLAG_RGB,
>      },
> @@ -1001,10 +1001,10 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 6, 1, 0, 16, 5, 15 },       /* B */
> -            { 0, 6, 3, 0, 16, 5, 15 },       /* G */
> -            { 0, 6, 5, 0, 16, 5, 15 },       /* R */
> -            { 0, 6, 7, 0, 16, 5, 15 },       /* A */
> +            { 0, 6, 0, 0, 16, 5, 15, 1 },       /* B */
> +            { 0, 6, 2, 0, 16, 5, 15, 3 },       /* G */
> +            { 0, 6, 4, 0, 16, 5, 15, 5 },       /* R */
> +            { 0, 6, 6, 0, 16, 5, 15, 7 },       /* A */
>          },
>          .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB | 
> AV_PIX_FMT_FLAG_ALPHA,
>      },
> @@ -1014,10 +1014,10 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 6, 1, 0, 16, 5, 15 },       /* B */
> -            { 0, 6, 3, 0, 16, 5, 15 },       /* G */
> -            { 0, 6, 5, 0, 16, 5, 15 },       /* R */
> -            { 0, 6, 7, 0, 16, 5, 15 },       /* A */
> +            { 0, 6, 0, 0, 16, 5, 15, 1 },       /* B */
> +            { 0, 6, 2, 0, 16, 5, 15, 3 },       /* G */
> +            { 0, 6, 4, 0, 16, 5, 15, 5 },       /* R */
> +            { 0, 6, 6, 0, 16, 5, 15, 7 },       /* A */
>          },
>          .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA,
>      },
> @@ -1027,9 +1027,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 2, 0, 3, 5, 1, 4 },        /* B */
> -            { 0, 2, 1, 5, 6, 1, 5 },        /* G */
> -            { 0, 2, 1, 0, 5, 1, 4 },        /* R */
> +            { 0, 2, -1, 3, 5, 1, 4, 0 },        /* B */
> +            { 0, 2,  0, 5, 6, 1, 5, 1 },        /* G */
> +            { 0, 2,  0, 0, 5, 1, 4, 1 },        /* R */
>          },
>          .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB,
>      },
> @@ -1039,9 +1039,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 2, 2, 3, 5, 1, 4 },        /* B */
> -            { 0, 2, 1, 5, 6, 1, 5 },        /* G */
> -            { 0, 2, 1, 0, 5, 1, 4 },        /* R */
> +            { 0, 2, 1, 3, 5, 1, 4, 2 },        /* B */
> +            { 0, 2, 0, 5, 6, 1, 5, 1 },        /* G */
> +            { 0, 2, 0, 0, 5, 1, 4, 1 },        /* R */
>          },
>          .flags = AV_PIX_FMT_FLAG_RGB,
>      },
> @@ -1051,9 +1051,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 2, 0, 2, 5, 1, 4 },       /* B */
> -            { 0, 2, 1, 5, 5, 1, 4 },       /* G */
> -            { 0, 2, 1, 0, 5, 1, 4 },       /* R */
> +            { 0, 2, -1, 2, 5, 1, 4, 0 },       /* B */
> +            { 0, 2,  0, 5, 5, 1, 4, 1 },       /* G */
> +            { 0, 2,  0, 0, 5, 1, 4, 1 },       /* R */
>          },
>          .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB,
>       },
> @@ -1063,9 +1063,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 2, 2, 2, 5, 1, 4 },        /* B */
> -            { 0, 2, 1, 5, 5, 1, 4 },        /* G */
> -            { 0, 2, 1, 0, 5, 1, 4 },        /* R */
> +            { 0, 2, 1, 2, 5, 1, 4, 2 },        /* B */
> +            { 0, 2, 0, 5, 5, 1, 4, 1 },        /* G */
> +            { 0, 2, 0, 0, 5, 1, 4, 1 },        /* R */
>          },
>          .flags = AV_PIX_FMT_FLAG_RGB,
>      },
> @@ -1075,9 +1075,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 2, 0, 0, 4, 1, 3 },       /* B */
> -            { 0, 2, 1, 4, 4, 1, 3 },       /* G */
> -            { 0, 2, 1, 0, 4, 1, 3 },       /* R */
> +            { 0, 2, -1, 0, 4, 1, 3, 0 },       /* B */
> +            { 0, 2,  0, 4, 4, 1, 3, 1 },       /* G */
> +            { 0, 2,  0, 0, 4, 1, 3, 1 },       /* R */
>          },
>          .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB,
>       },
> @@ -1087,9 +1087,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 2, 2, 0, 4, 1, 3 },        /* B */
> -            { 0, 2, 1, 4, 4, 1, 3 },        /* G */
> -            { 0, 2, 1, 0, 4, 1, 3 },        /* R */
> +            { 0, 2, 1, 0, 4, 1, 3, 2 },        /* B */
> +            { 0, 2, 0, 4, 4, 1, 3, 1 },        /* G */
> +            { 0, 2, 0, 0, 4, 1, 3, 1 },        /* R */
>          },
>          .flags = AV_PIX_FMT_FLAG_RGB,
>      },
> @@ -1123,9 +1123,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 1,
>          .log2_chroma_h = 1,
>          .comp = {
> -            { 0, 2, 1, 0, 9, 1, 8 },        /* Y */
> -            { 1, 2, 1, 0, 9, 1, 8 },        /* U */
> -            { 2, 2, 1, 0, 9, 1, 8 },        /* V */
> +            { 0, 2, 0, 0, 9, 1, 8, 1 },        /* Y */
> +            { 1, 2, 0, 0, 9, 1, 8, 1 },        /* U */
> +            { 2, 2, 0, 0, 9, 1, 8, 1 },        /* V */
>          },
>          .flags = AV_PIX_FMT_FLAG_PLANAR,
>      },
> @@ -1135,9 +1135,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 1,
>          .log2_chroma_h = 1,
>          .comp = {
> -            { 0, 2, 1, 0, 9, 1, 8 },        /* Y */
> -            { 1, 2, 1, 0, 9, 1, 8 },        /* U */
> -            { 2, 2, 1, 0, 9, 1, 8 },        /* V */
> +            { 0, 2, 0, 0, 9, 1, 8, 1 },        /* Y */
> +            { 1, 2, 0, 0, 9, 1, 8, 1 },        /* U */
> +            { 2, 2, 0, 0, 9, 1, 8, 1 },        /* V */
>          },
>          .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR,
>      },
> @@ -1147,9 +1147,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 1,
>          .log2_chroma_h = 1,
>          .comp = {
> -            { 0, 2, 1, 0, 10, 1, 9 },        /* Y */
> -            { 1, 2, 1, 0, 10, 1, 9 },        /* U */
> -            { 2, 2, 1, 0, 10, 1, 9 },        /* V */
> +            { 0, 2, 0, 0, 10, 1, 9, 1 },        /* Y */
> +            { 1, 2, 0, 0, 10, 1, 9, 1 },        /* U */
> +            { 2, 2, 0, 0, 10, 1, 9, 1 },        /* V */
>          },
>          .flags = AV_PIX_FMT_FLAG_PLANAR,
>      },
> @@ -1159,9 +1159,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 1,
>          .log2_chroma_h = 1,
>          .comp = {
> -            { 0, 2, 1, 0, 10, 1, 9 },        /* Y */
> -            { 1, 2, 1, 0, 10, 1, 9 },        /* U */
> -            { 2, 2, 1, 0, 10, 1, 9 },        /* V */
> +            { 0, 2, 0, 0, 10, 1, 9, 1 },        /* Y */
> +            { 1, 2, 0, 0, 10, 1, 9, 1 },        /* U */
> +            { 2, 2, 0, 0, 10, 1, 9, 1 },        /* V */
>          },
>          .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR,
>      },
> @@ -1171,9 +1171,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 1,
>          .log2_chroma_h = 1,
>          .comp = {
> -            { 0, 2, 1, 0, 16, 1, 15 },        /* Y */
> -            { 1, 2, 1, 0, 16, 1, 15 },        /* U */
> -            { 2, 2, 1, 0, 16, 1, 15 },        /* V */
> +            { 0, 2, 0, 0, 16, 1, 15, 1 },        /* Y */
> +            { 1, 2, 0, 0, 16, 1, 15, 1 },        /* U */
> +            { 2, 2, 0, 0, 16, 1, 15, 1 },        /* V */
>          },
>          .flags = AV_PIX_FMT_FLAG_PLANAR,
>      },
> @@ -1183,9 +1183,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 1,
>          .log2_chroma_h = 1,
>          .comp = {
> -            { 0, 2, 1, 0, 16, 1, 15 },        /* Y */
> -            { 1, 2, 1, 0, 16, 1, 15 },        /* U */
> -            { 2, 2, 1, 0, 16, 1, 15 },        /* V */
> +            { 0, 2, 0, 0, 16, 1, 15, 1 },        /* Y */
> +            { 1, 2, 0, 0, 16, 1, 15, 1 },        /* U */
> +            { 2, 2, 0, 0, 16, 1, 15, 1 },        /* V */
>          },
>          .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR,
>      },
> @@ -1195,9 +1195,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 1,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 2, 1, 0, 9, 1, 8 },        /* Y */
> -            { 1, 2, 1, 0, 9, 1, 8 },        /* U */
> -            { 2, 2, 1, 0, 9, 1, 8 },        /* V */
> +            { 0, 2, 0, 0, 9, 1, 8, 1 },        /* Y */
> +            { 1, 2, 0, 0, 9, 1, 8, 1 },        /* U */
> +            { 2, 2, 0, 0, 9, 1, 8, 1 },        /* V */
>          },
>          .flags = AV_PIX_FMT_FLAG_PLANAR,
>      },
> @@ -1207,9 +1207,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 1,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 2, 1, 0, 9, 1, 8 },        /* Y */
> -            { 1, 2, 1, 0, 9, 1, 8 },        /* U */
> -            { 2, 2, 1, 0, 9, 1, 8 },        /* V */
> +            { 0, 2, 0, 0, 9, 1, 8, 1 },        /* Y */
> +            { 1, 2, 0, 0, 9, 1, 8, 1 },        /* U */
> +            { 2, 2, 0, 0, 9, 1, 8, 1 },        /* V */
>          },
>          .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR,
>      },
> @@ -1219,9 +1219,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 1,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 2, 1, 0, 10, 1, 9 },        /* Y */
> -            { 1, 2, 1, 0, 10, 1, 9 },        /* U */
> -            { 2, 2, 1, 0, 10, 1, 9 },        /* V */
> +            { 0, 2, 0, 0, 10, 1, 9, 1 },        /* Y */
> +            { 1, 2, 0, 0, 10, 1, 9, 1 },        /* U */
> +            { 2, 2, 0, 0, 10, 1, 9, 1 },        /* V */
>          },
>          .flags = AV_PIX_FMT_FLAG_PLANAR,
>      },
> @@ -1231,9 +1231,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 1,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 2, 1, 0, 10, 1, 9 },        /* Y */
> -            { 1, 2, 1, 0, 10, 1, 9 },        /* U */
> -            { 2, 2, 1, 0, 10, 1, 9 },        /* V */
> +            { 0, 2, 0, 0, 10, 1, 9, 1 },        /* Y */
> +            { 1, 2, 0, 0, 10, 1, 9, 1 },        /* U */
> +            { 2, 2, 0, 0, 10, 1, 9, 1 },        /* V */
>          },
>          .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR,
>      },
> @@ -1243,9 +1243,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 1,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 2, 1, 0, 16, 1, 15 },        /* Y */
> -            { 1, 2, 1, 0, 16, 1, 15 },        /* U */
> -            { 2, 2, 1, 0, 16, 1, 15 },        /* V */
> +            { 0, 2, 0, 0, 16, 1, 15, 1 },        /* Y */
> +            { 1, 2, 0, 0, 16, 1, 15, 1 },        /* U */
> +            { 2, 2, 0, 0, 16, 1, 15, 1 },        /* V */
>          },
>          .flags = AV_PIX_FMT_FLAG_PLANAR,
>      },
> @@ -1255,9 +1255,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 1,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 2, 1, 0, 16, 1, 15 },        /* Y */
> -            { 1, 2, 1, 0, 16, 1, 15 },        /* U */
> -            { 2, 2, 1, 0, 16, 1, 15 },        /* V */
> +            { 0, 2, 0, 0, 16, 1, 15, 1 },        /* Y */
> +            { 1, 2, 0, 0, 16, 1, 15, 1 },        /* U */
> +            { 2, 2, 0, 0, 16, 1, 15, 1 },        /* V */
>          },
>          .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR,
>      },
> @@ -1267,9 +1267,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 2, 1, 0, 16, 1, 15 },        /* Y */
> -            { 1, 2, 1, 0, 16, 1, 15 },        /* U */
> -            { 2, 2, 1, 0, 16, 1, 15 },        /* V */
> +            { 0, 2, 0, 0, 16, 1, 15, 1 },        /* Y */
> +            { 1, 2, 0, 0, 16, 1, 15, 1 },        /* U */
> +            { 2, 2, 0, 0, 16, 1, 15, 1 },        /* V */
>          },
>          .flags = AV_PIX_FMT_FLAG_PLANAR,
>      },
> @@ -1279,9 +1279,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 2, 1, 0, 16, 1, 15 },        /* Y */
> -            { 1, 2, 1, 0, 16, 1, 15 },        /* U */
> -            { 2, 2, 1, 0, 16, 1, 15 },        /* V */
> +            { 0, 2, 0, 0, 16, 1, 15, 1 },        /* Y */
> +            { 1, 2, 0, 0, 16, 1, 15, 1 },        /* U */
> +            { 2, 2, 0, 0, 16, 1, 15, 1 },        /* V */
>          },
>          .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR,
>      },
> @@ -1291,9 +1291,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 2, 1, 0, 10, 1, 9 },        /* Y */
> -            { 1, 2, 1, 0, 10, 1, 9 },        /* U */
> -            { 2, 2, 1, 0, 10, 1, 9 },        /* V */
> +            { 0, 2, 0, 0, 10, 1, 9, 1 },        /* Y */
> +            { 1, 2, 0, 0, 10, 1, 9, 1 },        /* U */
> +            { 2, 2, 0, 0, 10, 1, 9, 1 },        /* V */
>          },
>          .flags = AV_PIX_FMT_FLAG_PLANAR,
>      },
> @@ -1303,9 +1303,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 2, 1, 0, 10, 1, 9 },        /* Y */
> -            { 1, 2, 1, 0, 10, 1, 9 },        /* U */
> -            { 2, 2, 1, 0, 10, 1, 9 },        /* V */
> +            { 0, 2, 0, 0, 10, 1, 9, 1 },        /* Y */
> +            { 1, 2, 0, 0, 10, 1, 9, 1 },        /* U */
> +            { 2, 2, 0, 0, 10, 1, 9, 1 },        /* V */
>          },
>          .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR,
>      },
> @@ -1315,9 +1315,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 2, 1, 0, 9, 1, 8 },        /* Y */
> -            { 1, 2, 1, 0, 9, 1, 8 },        /* U */
> -            { 2, 2, 1, 0, 9, 1, 8 },        /* V */
> +            { 0, 2, 0, 0, 9, 1, 8, 1 },        /* Y */
> +            { 1, 2, 0, 0, 9, 1, 8, 1 },        /* U */
> +            { 2, 2, 0, 0, 9, 1, 8, 1 },        /* V */
>          },
>          .flags = AV_PIX_FMT_FLAG_PLANAR,
>      },
> @@ -1327,9 +1327,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 2, 1, 0, 9, 1, 8 },        /* Y */
> -            { 1, 2, 1, 0, 9, 1, 8 },        /* U */
> -            { 2, 2, 1, 0, 9, 1, 8 },        /* V */
> +            { 0, 2, 0, 0, 9, 1, 8, 1 },        /* Y */
> +            { 1, 2, 0, 0, 9, 1, 8, 1 },        /* U */
> +            { 2, 2, 0, 0, 9, 1, 8, 1 },        /* V */
>          },
>          .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR,
>      },
> @@ -1349,8 +1349,8 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .name = "ya8",
>          .nb_components = 2,
>          .comp = {
> -            { 0, 2, 1, 0, 8, 1, 7 },        /* Y */
> -            { 0, 2, 2, 0, 8, 1, 7 },        /* A */
> +            { 0, 2, 0, 0, 8, 1, 7, 1 },        /* Y */
> +            { 0, 2, 1, 0, 8, 1, 7, 2 },        /* A */
>          },
>          .flags = AV_PIX_FMT_FLAG_ALPHA,
>          .alias = "gray8a",
> @@ -1359,8 +1359,8 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .name = "ya16le",
>          .nb_components = 2,
>          .comp = {
> -            { 0, 4, 1, 0, 16, 3, 15 },        /* Y */
> -            { 0, 4, 3, 0, 16, 3, 15 },        /* A */
> +            { 0, 4, 0, 0, 16, 3, 15, 1 },        /* Y */
> +            { 0, 4, 2, 0, 16, 3, 15, 3 },        /* A */
>          },
>          .flags = AV_PIX_FMT_FLAG_ALPHA,
>      },
> @@ -1368,8 +1368,8 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .name = "ya16be",
>          .nb_components = 2,
>          .comp = {
> -            { 0, 4, 1, 0, 16, 3, 15 },        /* Y */
> -            { 0, 4, 3, 0, 16, 3, 15 },        /* A */
> +            { 0, 4, 0, 0, 16, 3, 15, 1 },        /* Y */
> +            { 0, 4, 2, 0, 16, 3, 15, 3 },        /* A */
>          },
>          .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_ALPHA,
>      },
> @@ -1379,9 +1379,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 1, 1, 0, 8, 0, 7 },        /* G */
> -            { 1, 1, 1, 0, 8, 0, 7 },        /* B */
> -            { 2, 1, 1, 0, 8, 0, 7 },        /* R */
> +            { 0, 1, 0, 0, 8, 0, 7, 1 },        /* G */
> +            { 1, 1, 0, 0, 8, 0, 7, 1 },        /* B */
> +            { 2, 1, 0, 0, 8, 0, 7, 1 },        /* R */
>          },
>          .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB,
>      },
> @@ -1391,9 +1391,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 2, 1, 0, 9, 1, 8 },        /* G */
> -            { 1, 2, 1, 0, 9, 1, 8 },        /* B */
> -            { 2, 2, 1, 0, 9, 1, 8 },        /* R */
> +            { 0, 2, 0, 0, 9, 1, 8, 1 },        /* G */
> +            { 1, 2, 0, 0, 9, 1, 8, 1 },        /* B */
> +            { 2, 2, 0, 0, 9, 1, 8, 1 },        /* R */
>          },
>          .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB,
>      },
> @@ -1403,9 +1403,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 2, 1, 0, 9, 1, 8 },        /* G */
> -            { 1, 2, 1, 0, 9, 1, 8 },        /* B */
> -            { 2, 2, 1, 0, 9, 1, 8 },        /* R */
> +            { 0, 2, 0, 0, 9, 1, 8, 1 },        /* G */
> +            { 1, 2, 0, 0, 9, 1, 8, 1 },        /* B */
> +            { 2, 2, 0, 0, 9, 1, 8, 1 },        /* R */
>          },
>          .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | 
> AV_PIX_FMT_FLAG_RGB,
>      },
> @@ -1415,9 +1415,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 2, 1, 0, 10, 1, 9 },        /* G */
> -            { 1, 2, 1, 0, 10, 1, 9 },        /* B */
> -            { 2, 2, 1, 0, 10, 1, 9 },        /* R */
> +            { 0, 2, 0, 0, 10, 1, 9, 1 },        /* G */
> +            { 1, 2, 0, 0, 10, 1, 9, 1 },        /* B */
> +            { 2, 2, 0, 0, 10, 1, 9, 1 },        /* R */
>          },
>          .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB,
>      },
> @@ -1427,9 +1427,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 2, 1, 0, 10, 1, 9 },        /* G */
> -            { 1, 2, 1, 0, 10, 1, 9 },        /* B */
> -            { 2, 2, 1, 0, 10, 1, 9 },        /* R */
> +            { 0, 2, 0, 0, 10, 1, 9, 1 },        /* G */
> +            { 1, 2, 0, 0, 10, 1, 9, 1 },        /* B */
> +            { 2, 2, 0, 0, 10, 1, 9, 1 },        /* R */
>          },
>          .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | 
> AV_PIX_FMT_FLAG_RGB,
>      },
> @@ -1439,9 +1439,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 2, 1, 0, 16, 1, 15 },       /* G */
> -            { 1, 2, 1, 0, 16, 1, 15 },       /* B */
> -            { 2, 2, 1, 0, 16, 1, 15 },       /* R */
> +            { 0, 2, 0, 0, 16, 1, 15, 1 },       /* G */
> +            { 1, 2, 0, 0, 16, 1, 15, 1 },       /* B */
> +            { 2, 2, 0, 0, 16, 1, 15, 1 },       /* R */
>          },
>          .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB,
>      },
> @@ -1451,9 +1451,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 2, 1, 0, 16, 1, 15 },       /* G */
> -            { 1, 2, 1, 0, 16, 1, 15 },       /* B */
> -            { 2, 2, 1, 0, 16, 1, 15 },       /* R */
> +            { 0, 2, 0, 0, 16, 1, 15, 1 },       /* G */
> +            { 1, 2, 0, 0, 16, 1, 15, 1 },       /* B */
> +            { 2, 2, 0, 0, 16, 1, 15, 1 },       /* R */
>          },
>          .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | 
> AV_PIX_FMT_FLAG_RGB,
>      },
> @@ -1463,10 +1463,10 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 1, 1, 0, 8, 0, 7 },        /* G */
> -            { 1, 1, 1, 0, 8, 0, 7 },        /* B */
> -            { 2, 1, 1, 0, 8, 0, 7 },        /* R */
> -            { 3, 1, 1, 0, 8, 0, 7 },        /* A */
> +            { 0, 1, 0, 0, 8, 0, 7, 1 },        /* G */
> +            { 1, 1, 0, 0, 8, 0, 7, 1 },        /* B */
> +            { 2, 1, 0, 0, 8, 0, 7, 1 },        /* R */
> +            { 3, 1, 0, 0, 8, 0, 7, 1 },        /* A */
>          },
>          .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB |
>                   AV_PIX_FMT_FLAG_ALPHA,
> @@ -1477,10 +1477,10 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 2, 1, 0, 16, 1, 15 },       /* G */
> -            { 1, 2, 1, 0, 16, 1, 15 },       /* B */
> -            { 2, 2, 1, 0, 16, 1, 15 },       /* R */
> -            { 3, 2, 1, 0, 16, 1, 15 },       /* A */
> +            { 0, 2, 0, 0, 16, 1, 15, 1 },       /* G */
> +            { 1, 2, 0, 0, 16, 1, 15, 1 },       /* B */
> +            { 2, 2, 0, 0, 16, 1, 15, 1 },       /* R */
> +            { 3, 2, 0, 0, 16, 1, 15, 1 },       /* A */
>          },
>          .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB |
>                   AV_PIX_FMT_FLAG_ALPHA,
> @@ -1491,10 +1491,10 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 2, 1, 0, 16, 1, 15 },       /* G */
> -            { 1, 2, 1, 0, 16, 1, 15 },       /* B */
> -            { 2, 2, 1, 0, 16, 1, 15 },       /* R */
> -            { 3, 2, 1, 0, 16, 1, 15 },       /* A */
> +            { 0, 2, 0, 0, 16, 1, 15, 1 },       /* G */
> +            { 1, 2, 0, 0, 16, 1, 15, 1 },       /* B */
> +            { 2, 2, 0, 0, 16, 1, 15, 1 },       /* R */
> +            { 3, 2, 0, 0, 16, 1, 15, 1 },       /* A */
>          },
>          .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR |
>                   AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA,
> @@ -1511,9 +1511,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 6, 1, 4, 12, 5, 11 },       /* X */
> -            { 0, 6, 3, 4, 12, 5, 11 },       /* Y */
> -            { 0, 6, 5, 4, 12, 5, 11 },       /* Z */
> +            { 0, 6, 0, 4, 12, 5, 11, 1 },       /* X */
> +            { 0, 6, 2, 4, 12, 5, 11, 3 },       /* Y */
> +            { 0, 6, 4, 4, 12, 5, 11, 5 },       /* Z */
>        },
>        /*.flags = -- not used*/
>      },
> @@ -1523,9 +1523,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 0,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 6, 1, 4, 12, 5, 11 },       /* X */
> -            { 0, 6, 3, 4, 12, 5, 11 },       /* Y */
> -            { 0, 6, 5, 4, 12, 5, 11 },       /* Z */
> +            { 0, 6, 0, 4, 12, 5, 11, 1 },       /* X */
> +            { 0, 6, 2, 4, 12, 5, 11, 3 },       /* Y */
> +            { 0, 6, 4, 4, 12, 5, 11, 5 },       /* Z */
>         },
>          .flags = AV_PIX_FMT_FLAG_BE,
>      },
> @@ -1535,9 +1535,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 1,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 1, 1, 0, 8, 0, 7 },        /* Y */
> -            { 1, 2, 1, 0, 8, 1, 7 },        /* U */
> -            { 1, 2, 2, 0, 8, 1, 7 },        /* V */
> +            { 0, 1, 0, 0, 8, 0, 7, 1 },        /* Y */
> +            { 1, 2, 0, 0, 8, 1, 7, 1 },        /* U */
> +            { 1, 2, 1, 0, 8, 1, 7, 2 },        /* V */
>          },
>          .flags = AV_PIX_FMT_FLAG_PLANAR,
>      },
> @@ -1547,9 +1547,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 1,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 2, 1, 0, 10, 1, 9 },        /* Y */
> -            { 1, 4, 1, 0, 10, 3, 9 },        /* U */
> -            { 1, 4, 3, 0, 10, 3, 9 },        /* V */
> +            { 0, 2, 0, 0, 10, 1, 9, 1 },        /* Y */
> +            { 1, 4, 0, 0, 10, 3, 9, 1 },        /* U */
> +            { 1, 4, 2, 0, 10, 3, 9, 3 },        /* V */
>          },
>          .flags = AV_PIX_FMT_FLAG_PLANAR,
>      },
> @@ -1559,9 +1559,9 @@ static const AVPixFmtDescriptor 
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>          .log2_chroma_w = 1,
>          .log2_chroma_h = 0,
>          .comp = {
> -            { 0, 2, 1, 0, 10, 1, 9 },        /* Y */
> -            { 1, 4, 1, 0, 10, 3, 9 },        /* U */
> -            { 1, 4, 3, 0, 10, 3, 9 },        /* V */
> +            { 0, 2, 0, 0, 10, 1, 9, 1 },        /* Y */
> +            { 1, 4, 0, 0, 10, 3, 9, 1 },        /* U */
> +            { 1, 4, 2, 0, 10, 3, 9, 3 },        /* V */
>          },
>          .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_BE,
>      },
> diff --git a/libavutil/pixdesc.h b/libavutil/pixdesc.h
> index 1d1f71d..ea84fd3 100644
> --- a/libavutil/pixdesc.h
> +++ b/libavutil/pixdesc.h
> @@ -40,10 +40,10 @@ typedef struct AVComponentDescriptor {
>      int step;
>  
>      /**
> -     * Number of elements before the component of the first pixel plus 1.
> +     * Number of elements before the component of the first pixel.
>       * Elements are bits for bitstream formats, bytes otherwise.
>       */
> -    int offset_plus1;
> +    int offset;
>  
>      /**
>       * Number of least significant bits that must be shifted away
> @@ -62,6 +62,9 @@ typedef struct AVComponentDescriptor {
>  
>      /** deprecated, use depth instead */
>      attribute_deprecated int depth_minus1;
> +
> +    /** deprecated, use offset instead */
> +    attribute_deprecated int offset_plus1;
>  #endif
>  } AVComponentDescriptor;
>  

LGTM
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to