Unified · Split
| @@ -1593,6 +1593,8 @@ typedef struct AVCodecContext { · 1592 unmodified lines | |||
| 1593 | 1593 | ||
| 1594 | #define FF_PROFILE_EAC3_DDP_ATMOS 30 | 1594 | #define FF_PROFILE_EAC3_DDP_ATMOS 30 |
| 1595 | 1595 | ||
| 1596 | #define FF_PROFILE_TRUEHD_ATMOS 30 | ||
| 1597 | |||
| 1596 | #define FF_PROFILE_MPEG2_422 0 | 1598 | #define FF_PROFILE_MPEG2_422 0 |
| 1597 | #define FF_PROFILE_MPEG2_HIGH 1 | 1599 | #define FF_PROFILE_MPEG2_HIGH 1 |
| 1598 | #define FF_PROFILE_MPEG2_SS 2 | 1600 | #define FF_PROFILE_MPEG2_SS 2 |
| @@ -2960,6 +2960,7 @@ static const AVCodecDescriptor codec_descriptors[] = { · 2959 unmodified lines | |||
| 2960 | .name = "truehd", | 2960 | .name = "truehd", |
| 2961 | .long_name = NULL_IF_CONFIG_SMALL("TrueHD"), | 2961 | .long_name = NULL_IF_CONFIG_SMALL("TrueHD"), |
| 2962 | .props = AV_CODEC_PROP_LOSSLESS, | 2962 | .props = AV_CODEC_PROP_LOSSLESS, |
| 2963 | .profiles = NULL_IF_CONFIG_SMALL(ff_truehd_profiles), | ||
| 2963 | }, | 2964 | }, |
| 2964 | { | 2965 | { |
| 2965 | .id = AV_CODEC_ID_MP4ALS, | 2966 | .id = AV_CODEC_ID_MP4ALS, |
| @@ -42,6 +42,7 @@ · 41 unmodified lines | |||
| 42 | #include "mlpdsp.h" | 42 | #include "mlpdsp.h" |
| 43 | #include "mlp.h" | 43 | #include "mlp.h" |
| 44 | #include "config.h" | 44 | #include "config.h" |
| 45 | #include "profiles.h" | ||
| 45 | 46 | ||
| 46 | /** number of bits used for VLC lookup - longest Huffman code is 9 */ | 47 | /** number of bits used for VLC lookup - longest Huffman code is 9 */ |
| 47 | #if ARCH_ARM | 48 | #if ARCH_ARM |
| @@ -392,6 +393,14 @@ static int read_major_sync(MLPDecodeContext *m, GetBitContext *gb) · 344 unmodified lines | |||
| 392 | m->num_substreams = mh.num_substreams; | 393 | m->num_substreams = mh.num_substreams; |
| 393 | m->substream_info = mh.substream_info; | 394 | m->substream_info = mh.substream_info; |
| 394 | 395 | ||
| 396 | /* If there is a 4th substream and the MSB of substream_info is set, | ||
| 397 | * there is a 16-channel spatial presentation (Atmos in TrueHD). | ||
| 398 | */ | ||
| 399 | if (m->avctx->codec_id == AV_CODEC_ID_TRUEHD | ||
| 400 | && m->num_substreams == 4 && m->substream_info >> 7 == 1) { | ||
| 401 | m->avctx->profile = FF_PROFILE_TRUEHD_ATMOS; | ||
| 402 | } | ||
| 403 | |||
| 395 | /* limit to decoding 3 substreams, as the 4th is used by Dolby Atmos for non-audio data */ | 404 | /* limit to decoding 3 substreams, as the 4th is used by Dolby Atmos for non-audio data */ |
| 396 | m->max_decoded_substream = FFMIN(m->num_substreams - 1, 2); | 405 | m->max_decoded_substream = FFMIN(m->num_substreams - 1, 2); |
| 397 | 406 | ||
| @@ -1452,5 +1461,6 @@ const FFCodec ff_truehd_decoder = { · 1054 unmodified lines | |||
| 1452 | FF_CODEC_DECODE_CB(read_access_unit), | 1461 | FF_CODEC_DECODE_CB(read_access_unit), |
| 1453 | .flush = mlp_decode_flush, | 1462 | .flush = mlp_decode_flush, |
| 1454 | .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF, | 1463 | .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF, |
| 1464 | .p.profiles = NULL_IF_CONFIG_SMALL(ff_truehd_profiles), | ||
| 1455 | }; | 1465 | }; |
| 1456 | #endif /* CONFIG_TRUEHD_DECODER */ | 1466 | #endif /* CONFIG_TRUEHD_DECODER */ |
| @@ -50,6 +50,11 @@ const AVProfile ff_eac3_profiles[] = { · 49 unmodified lines | |||
| 50 | { FF_PROFILE_UNKNOWN }, | 50 | { FF_PROFILE_UNKNOWN }, |
| 51 | }; | 51 | }; |
| 52 | 52 | ||
| 53 | const AVProfile ff_truehd_profiles[] = { | ||
| 54 | { FF_PROFILE_TRUEHD_ATMOS, "Dolby TrueHD + Dolby Atmos"}, | ||
| 55 | { FF_PROFILE_UNKNOWN }, | ||
| 56 | }; | ||
| 57 | |||
| 53 | const AVProfile ff_dnxhd_profiles[] = { | 58 | const AVProfile ff_dnxhd_profiles[] = { |
| 54 | { FF_PROFILE_DNXHD, "DNXHD"}, | 59 | { FF_PROFILE_DNXHD, "DNXHD"}, |
| 55 | { FF_PROFILE_DNXHR_LB, "DNXHR LB"}, | 60 | { FF_PROFILE_DNXHR_LB, "DNXHR LB"}, |
| @@ -59,6 +59,7 @@ · 58 unmodified lines | |||
| 59 | extern const AVProfile ff_aac_profiles[]; | 59 | extern const AVProfile ff_aac_profiles[]; |
| 60 | extern const AVProfile ff_dca_profiles[]; | 60 | extern const AVProfile ff_dca_profiles[]; |
| 61 | extern const AVProfile ff_eac3_profiles[]; | 61 | extern const AVProfile ff_eac3_profiles[]; |
| 62 | extern const AVProfile ff_truehd_profiles[]; | ||
| 62 | extern const AVProfile ff_dnxhd_profiles[]; | 63 | extern const AVProfile ff_dnxhd_profiles[]; |
| 63 | extern const AVProfile ff_h264_profiles[]; | 64 | extern const AVProfile ff_h264_profiles[]; |
| 64 | extern const AVProfile ff_hevc_profiles[]; | 65 | extern const AVProfile ff_hevc_profiles[]; |