[FFmpeg-devel] [PATCH] avcodec: add an AV1 parser
James Almer
jamrial at gmail.com
Mon Sep 24 06:39:06 EEST 2018
On 9/23/2018 9:12 PM, James Almer wrote:
> + subsampling = seq->color_config.subsampling_x << 1 & seq->color_config.subsampling_y;
Changed the logical and into a logical or locally.
> + bitdepth = 8 + seq->color_config.high_bitdepth * 2 + seq->color_config.twelve_bit * 2;
> + switch (bitdepth) {
> + case 8:
> + if (subsampling == 3) ctx->format = seq->color_config.mono_chrome ? AV_PIX_FMT_GRAY8 :
> + AV_PIX_FMT_YUV420P;
> + else if (subsampling == 2) ctx->format = AV_PIX_FMT_YUV422P;
> + else ctx->format = AV_PIX_FMT_YUV444P;
> + break;
> + case 10:
> + if (subsampling == 3) ctx->format = seq->color_config.mono_chrome ? AV_PIX_FMT_GRAY10 :
> + AV_PIX_FMT_YUV420P10;
> + else if (subsampling == 2) ctx->format = AV_PIX_FMT_YUV422P10;
> + else ctx->format = AV_PIX_FMT_YUV444P10;
> + break;
> + case 12:
> + if (subsampling == 3) ctx->format = seq->color_config.mono_chrome ? AV_PIX_FMT_GRAY12 :
> + AV_PIX_FMT_YUV420P12;
> + else if (subsampling == 2) ctx->format = AV_PIX_FMT_YUV422P12;
> + else ctx->format = AV_PIX_FMT_YUV444P12;
> + break;
> + }
More information about the ffmpeg-devel
mailing list