vlc | branch: master | Thomas Guillem <[email protected]> | Thu Oct 3 16:05:09 2019 +0200| [a87875a8c263c3f2b94647e229aaafb0544f2cda] | committer: Thomas Guillem
packetizer: detect AC-3 core + EAC3 extension This will allow audio output to first try EAC3 and/or fallback to AC3. cf. https://en.wikipedia.org/wiki/Dolby_Digital_Plus#HD_DVD_and_Blu-ray_Disc "On Blu-ray Disc, DD+ is an optional codec, and is deployed as an extension to a "core" AC-3 5.1 audiotrack. The AC-3 core is encoded at 640 kbit/s, carries 5 primary channels (and 1 LFE), and is independently playable as a movie audio track by any Blu-ray Disc player. The DD+ extension bitstream is used on players that support it by replacing the rear channels in the 5.1 setup with higher fidelity versions, along with providing a possible channel extension to 6.1 or 7.1. The complete audio track is allowed a combined bitrate of 1.7 Mbit/s: 640 kbit/s for the AC-3 5.1 core, and 1 Mbit/s for the DD+ extension. During playback, both the core and extension bitstreams contribute to the final audio-output, according to rules embedded in the bitstream metadata." > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a87875a8c263c3f2b94647e229aaafb0544f2cda --- modules/packetizer/a52.c | 4 ++++ modules/packetizer/a52.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/modules/packetizer/a52.c b/modules/packetizer/a52.c index 91afafcf54..15890af14b 100644 --- a/modules/packetizer/a52.c +++ b/modules/packetizer/a52.c @@ -258,7 +258,11 @@ static block_t *PacketizeBlock( decoder_t *p_dec, block_t **pp_block ) vlc_a52_header_t a52; if( !vlc_a52_header_Parse( &a52, p_header, VLC_A52_MIN_HEADER_SIZE ) && a52.b_eac3 && a52.bs.eac3.strmtyp == EAC3_STRMTYP_DEPENDENT ) + { p_sys->i_input_size += a52.i_size; + p_dec->fmt_out.i_codec = VLC_CODEC_A52; + p_dec->fmt_out.i_profile = VLC_A52_PROFILE_EAC3_DEPENDENT; + } p_sys->i_state = STATE_GET_DATA; break; diff --git a/modules/packetizer/a52.h b/modules/packetizer/a52.h index 42d09dc7bd..fe04b5edf6 100644 --- a/modules/packetizer/a52.h +++ b/modules/packetizer/a52.h @@ -36,6 +36,8 @@ #define VLC_A52_EAC3_BSI_SIZE ((532 + 7)/8) #define VLC_A52_EAC3_HEADER_SIZE (VLC_A52_EAC3_BSI_SIZE + 2) +#define VLC_A52_PROFILE_EAC3_DEPENDENT 1 + /** * AC3 header information. */ _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
