[vlc-devel] [PATCH 2/3] vpx: Decode additional profiles and high bit depth formats

Vittorio Giovara vittorio.giovara at gmail.com
Sun Sep 25 18:39:38 CEST 2016


On Sun, Sep 25, 2016 at 11:59 AM, Jean-Baptiste Kempf <jb at videolan.org> wrote:
> On 25 Sep, Vittorio Giovara wrote :
>> +    { VLC_CODEC_I420, VPX_IMG_FMT_I420, 0, 8, 0 },
>> +    { VLC_CODEC_I422, VPX_IMG_FMT_I422, 0, 8, 0 },
>> +    { VLC_CODEC_I444, VPX_IMG_FMT_I444, 0, 8, 0 },
>> +    { VLC_CODEC_I440, VPX_IMG_FMT_I440, 0, 8, 0 },
>> +
>> +    { VLC_CODEC_J420, VPX_IMG_FMT_I420, 1, 8, 0 },
>> +    { VLC_CODEC_J422, VPX_IMG_FMT_I422, 1, 8, 0 },
>> +    { VLC_CODEC_J444, VPX_IMG_FMT_I444, 1, 8, 0 },
>> +    { VLC_CODEC_J440, VPX_IMG_FMT_I440, 1, 8, 0 },
>> +
>
> Those 4 do not make sense, at all.

Should I just ditch those and correctly set the fullrange flag?

>> +    { VLC_CODEC_YV12, VPX_IMG_FMT_YV12, 0, 8, 0 },
>> +    { VLC_CODEC_YUVA, VPX_IMG_FMT_444A, 0, 8, 0 },
>> +    { VLC_CODEC_YUYV, VPX_IMG_FMT_YUY2, 0, 8, 0 },
>> +    { VLC_CODEC_UYVY, VPX_IMG_FMT_UYVY, 0, 8, 0 },
>> +    { VLC_CODEC_YVYU, VPX_IMG_FMT_YVYU, 0, 8, 0 },
>> +
>> +    { VLC_CODEC_RGB15, VPX_IMG_FMT_RGB555, 0, 8, 0 },
>> +    { VLC_CODEC_RGB16, VPX_IMG_FMT_RGB565, 0, 8, 0 },
>> +    { VLC_CODEC_RGB24, VPX_IMG_FMT_RGB24, 0, 8, 0 },
>> +    { VLC_CODEC_RGB32, VPX_IMG_FMT_RGB32, 0, 8, 0 },
>> +
>> +    { VLC_CODEC_ARGB, VPX_IMG_FMT_ARGB, 0, 8, 0 },
>> +    { VLC_CODEC_BGRA, VPX_IMG_FMT_ARGB_LE, 0, 8, 0 },
>> +
>> +    { VLC_CODEC_GBR_PLANAR, VPX_IMG_FMT_I444, 0, 8, 1 }
>> +    { VLC_CODEC_GBR_PLANAR_10L, VPX_IMG_FMT_I44416, 0, 10, 1 }
>> +
>> +    { VLC_CODEC_I420_10L, VPX_IMG_FMT_I42016, 0, 10, 0 },
>> +    { VLC_CODEC_I422_10L, VPX_IMG_FMT_I42216, 0, 10, 0 },
>> +    { VLC_CODEC_I444_10L, VPX_IMG_FMT_I44416, 0, 10, 0 },
>> +
>> +    { VLC_CODEC_I420_12L, VPX_IMG_FMT_I42016, 0, 12, 0 },
>> +    { VLC_CODEC_I422_12L, VPX_IMG_FMT_I42216, 0, 12, 0 },
>> +    { VLC_CODEC_I444_12L, VPX_IMG_FMT_I44416, 0, 12, 0 },
>> +
>> +    { VLC_CODEC_I444_16L, VPX_IMG_FMT_I44416, 0, 16, 0 },
>
> I'm a bit surprised that all those exist in vpx, but ok.

I agree they are mostly redundant. The high bit depth ones are all 16
bit mapped, so it's fine.

>> +static vlc_fourcc_t FindVlcChroma( struct vpx_image *img, vpx_codec_caps_t codec_caps )
>> +{
>> +    int hack = (img->fmt & VPX_IMG_FMT_I444) && (img->cs == VPX_CS_SRGB);
>
> ??

They use one of the colorspace values to signal planar rgb, see
- http://git.videolan.org/?p=ffmpeg.git;a=blob;f=libavcodec/libvpxenc.c;h=2db87f7f2a27374a37609033e083c1a92c30a828;hb=HEAD#l300
- http://git.videolan.org/?p=ffmpeg.git;a=blob;f=libavcodec/libvpxdec.c;h=5204c993cd7de6b1dc7fd7c7f8173024af0e858a;hb=HEAD#l109

-- 
Vittorio


More information about the vlc-devel mailing list