summaryrefslogtreecommitdiffstats
path: root/libhb
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2011-03-19 18:43:19 +0000
committerjstebbins <[email protected]>2011-03-19 18:43:19 +0000
commit6fd4cbe2420946f08602f61c84730c1fa927554a (patch)
treeabce9efb42554c73d5253e9964f8a0480dcad9b4 /libhb
parent64503043ab114ffa207431c5c6a2293f1936278d (diff)
Add support for DTS-HD High Resolution Audio for BD streams
Thanks to Rodeo for the patch. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3851 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb')
-rw-r--r--libhb/stream.c34
1 files changed, 29 insertions, 5 deletions
diff --git a/libhb/stream.c b/libhb/stream.c
index 65abcb421..8a5e5a473 100644
--- a/libhb/stream.c
+++ b/libhb/stream.c
@@ -65,13 +65,13 @@ static const stream2codec_t st2codec[256] = {
st(0x1b, V, WORK_DECAVCODECV, CODEC_ID_H264, "H.264"),
- st(0x80, N, HB_ACODEC_MPGA, CODEC_ID_PCM_BLURAY, "DigiCipher II Video"),
+ st(0x80, N, HB_ACODEC_MPGA, CODEC_ID_PCM_BLURAY, "DigiCipher II Video/LPCM"),
st(0x81, A, HB_ACODEC_AC3, 0, "AC-3"),
st(0x82, A, HB_ACODEC_DCA, 0, "HDMV DTS"),
st(0x83, A, HB_ACODEC_LPCM, 0, "LPCM/TrueHD"),
st(0x84, A, 0, 0, "SDDS/EAC3"),
- st(0x85, U, 0, 0, "ATSC Program ID"),
- st(0x86, A, HB_ACODEC_DCA, 0, "DTS-HD"),
+ st(0x85, U, 0, 0, "ATSC Program ID/DTS-HD HRA"),
+ st(0x86, A, HB_ACODEC_DCA, 0, "DTS-HD MA"),
st(0x87, A, HB_ACODEC_MPGA, CODEC_ID_EAC3, "EAC3"),
st(0x8a, A, HB_ACODEC_DCA, 0, "DTS"),
@@ -690,7 +690,18 @@ hb_stream_t * hb_bd_stream_open( hb_title_t *title )
if ( d->ts_stream_type[d->ts_number_pids] == 0x86 &&
title->reg_desc == STR4_TO_UINT32("HDMV") )
{
- // This is an interleaved DTS-HD/DTS stream and the esid of
+ // This is an interleaved DTS-HD MA/DTS stream and the esid of
+ // the DTS is 0x71
+ d->ts_multiplexed[d->ts_number_pids] = 0x71;
+ d->ts_stream_type[d->ts_number_pids] = 0x82;
+ }
+ if ( d->ts_stream_type[d->ts_number_pids] == 0x85 &&
+ title->reg_desc == STR4_TO_UINT32("HDMV") )
+ {
+ // DTS-HD HRA audio in bluray has an stype of 0x85
+ // which conflicts with ATSC Program ID
+ // To distinguish, Bluray streams have a reg_desc of HDMV
+ // This is an interleaved DTS-HD HRA/DTS stream and the esid of
// the DTS is 0x71
d->ts_multiplexed[d->ts_number_pids] = 0x71;
d->ts_stream_type[d->ts_number_pids] = 0x82;
@@ -1663,7 +1674,20 @@ static hb_audio_t *hb_ts_stream_set_audio_id_and_codec(hb_stream_t *stream,
}
if ( st2codec[stype].kind == A && stype == 0x86 )
{
- // This is an interleaved DTS-HD/DTS stream and the esid of
+ // This is an interleaved DTS-HD MA/DTS stream and the esid of
+ // the DTS is 0x71
+ stream->ts_multiplexed[idx] = 0x71;
+ stype = 0x82;
+ stream->ts_stream_type[idx] = 0x82;
+ kind = A;
+ }
+ if ( stype == 0x85 &&
+ stream->pmt_info.reg_desc == STR4_TO_UINT32("HDMV") )
+ {
+ // DTS-HD HRA audio in bluray has an stype of 0x85
+ // which conflicts with ATSC Program ID
+ // To distinguish, Bluray streams have a reg_desc of HDMV
+ // This is an interleaved DTS-HD HRA/DTS stream and the esid of
// the DTS is 0x71
stream->ts_multiplexed[idx] = 0x71;
stype = 0x82;