1
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 3d5976c4ae
commit 1d2ae9e9f3
Signed by: hendrik
GPG Key ID: 846079A4B0A7C1B5

View File

@ -179,6 +179,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);