diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2018-11-02 15:24:45 -0400 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2018-11-05 12:39:23 -0500 |
commit | aefbb2bf029f3a01cc4198c9470550f7b007e868 (patch) | |
tree | 67c8038064638d01b8586c12eccab62b59f7e91c /libavcodec/proresdec2.c | |
parent | cdc487bfc841ce47e64bdd774f7bcc40e3f4a626 (diff) | |
download | ffmpeg-aefbb2bf029f3a01cc4198c9470550f7b007e868.tar.gz |
proresdec2: Parse codec_tag and export profile information
Diffstat (limited to 'libavcodec/proresdec2.c')
-rw-r--r-- | libavcodec/proresdec2.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/libavcodec/proresdec2.c b/libavcodec/proresdec2.c index 6b3021bdfa..130a4e3fe8 100644 --- a/libavcodec/proresdec2.c +++ b/libavcodec/proresdec2.c @@ -62,6 +62,30 @@ static av_cold int decode_init(AVCodecContext *avctx) permute(ctx->progressive_scan, ff_prores_progressive_scan, idct_permutation); permute(ctx->interlaced_scan, ff_prores_interlaced_scan, idct_permutation); + switch (avctx->codec_tag) { + case MKTAG('a','p','c','o'): + avctx->profile = FF_PROFILE_PRORES_PROXY; + break; + case MKTAG('a','p','c','s'): + avctx->profile = FF_PROFILE_PRORES_LT; + break; + case MKTAG('a','p','c','n'): + avctx->profile = FF_PROFILE_PRORES_STANDARD; + break; + case MKTAG('a','p','c','h'): + avctx->profile = FF_PROFILE_PRORES_HQ; + break; + case MKTAG('a','p','4','h'): + avctx->profile = FF_PROFILE_PRORES_4444; + break; + case MKTAG('a','p','4','x'): + avctx->profile = FF_PROFILE_PRORES_XQ; + break; + default: + avctx->profile = FF_PROFILE_UNKNOWN; + av_log(avctx, AV_LOG_WARNING, "Unknown prores profile %d\n", avctx->codec_tag); + } + return 0; } |