1
0
Fork 0

prores: set avtx->pix_fmt based on the fourcc code during init

This commit is contained in:
Hendrik Leppkes 2012-01-07 02:01:08 +01:00
parent e40b1a9214
commit 539b17963b
Signed by: hendrik
GPG Key ID: 846079A4B0A7C1B5
1 changed files with 21 additions and 0 deletions

View File

@ -178,6 +178,27 @@ static av_cold int decode_init(AVCodecContext *avctx)
return ret;
}
switch (avctx->codec_tag) {
case MKTAG('a', 'p', 'c', 'h'):
avctx->pix_fmt = AV_PIX_FMT_YUV422P10;
break;
case MKTAG('a', 'p', 'c', 'n'):
avctx->pix_fmt = AV_PIX_FMT_YUV422P10;
break;
case MKTAG('a', 'p', 'c', 's'):
avctx->pix_fmt = AV_PIX_FMT_YUV422P10;
break;
case MKTAG('a', 'p', 'c', 'o'):
avctx->pix_fmt = AV_PIX_FMT_YUV422P10;
break;
case MKTAG('a', 'p', '4', 'h'):
avctx->pix_fmt = AV_PIX_FMT_YUV444P10;
break;
default:
av_log(avctx, AV_LOG_WARNING, "Unknown ProRes FOURCC provided (%08X)\n",
avctx->codec_tag);
}
ff_init_scantable_permutation(idct_permutation,
ctx->prodsp.idct_permutation_type);