[vlc-devel] [PATCH] codec: aom: Handle extended color spaces

Vittorio Giovara vittorio.giovara at gmail.com
Fri Dec 16 17:08:56 CET 2016


On Thu, Dec 15, 2016 at 7:08 PM, Alex Converse <alex.converse at gmail.com> wrote:
> From: Jim Bankoski <jimbankoski at google.com>
>
> Support 10/12-bit, full/partial color range and BT.601/709/2020.
>
> Signed-off-by: Alex Converse <alex.converse at gmail.com>
> ---
>  modules/codec/aom.c | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++-
>  1 file changed, 77 insertions(+), 1 deletion(-)
>
> diff --git a/modules/codec/aom.c b/modules/codec/aom.c
> index e080f74..fb818f1 100644
> --- a/modules/codec/aom.c
> +++ b/modules/codec/aom.c
> @@ -74,6 +74,61 @@ struct decoder_sys_t
>      aom_codec_ctx_t ctx;
>  };
>
> +static const struct
> +{
> +    vlc_fourcc_t     i_chroma;
> +    enum aom_img_fmt i_chroma_id;
> +    uint8_t          i_bitdepth;
> +    uint8_t          i_needs_hack;
> +
> +} chroma_table[] =
> +{
> +    { VLC_CODEC_I420, AOM_IMG_FMT_I420, 8, 0 },
> +    { VLC_CODEC_I422, AOM_IMG_FMT_I422, 8, 0 },
> +    { VLC_CODEC_I444, AOM_IMG_FMT_I444, 8, 0 },
> +    { VLC_CODEC_I440, AOM_IMG_FMT_I440, 8, 0 },
> +
> +    { VLC_CODEC_YV12, AOM_IMG_FMT_YV12, 8, 0 },
> +    { VLC_CODEC_YUVA, AOM_IMG_FMT_444A, 8, 0 },
> +    { VLC_CODEC_YUYV, AOM_IMG_FMT_YUY2, 8, 0 },
> +    { VLC_CODEC_UYVY, AOM_IMG_FMT_UYVY, 8, 0 },
> +    { VLC_CODEC_YVYU, AOM_IMG_FMT_YVYU, 8, 0 },
> +
> +    { VLC_CODEC_RGB15, AOM_IMG_FMT_RGB555, 8, 0 },
> +    { VLC_CODEC_RGB16, AOM_IMG_FMT_RGB565, 8, 0 },
> +    { VLC_CODEC_RGB24, AOM_IMG_FMT_RGB24, 8, 0 },
> +    { VLC_CODEC_RGB32, AOM_IMG_FMT_RGB32, 8, 0 },
> +
> +    { VLC_CODEC_ARGB, AOM_IMG_FMT_ARGB, 8, 0 },
> +    { VLC_CODEC_BGRA, AOM_IMG_FMT_ARGB_LE, 8, 0 },
> +
> +    { VLC_CODEC_GBR_PLANAR, AOM_IMG_FMT_I444, 8, 1 },
> +    { VLC_CODEC_GBR_PLANAR_10L, AOM_IMG_FMT_I44416, 10, 1 },

Hey Alex,
is there any possibility that this is fixed upstream rather than
propagating the needs_hack way?
-- 
Vittorio


More information about the vlc-devel mailing list