[MPlayer-cvslog] r24721 - trunk/libmpcodecs/ad_libdca.c
rtogni
subversion at mplayerhq.hu
Sun Oct 7 17:06:54 CEST 2007
Author: rtogni
Date: Sun Oct 7 17:06:53 2007
New Revision: 24721
Log:
Fix output channle ordering
Modified:
trunk/libmpcodecs/ad_libdca.c
Modified: trunk/libmpcodecs/ad_libdca.c
==============================================================================
--- trunk/libmpcodecs/ad_libdca.c (original)
+++ trunk/libmpcodecs/ad_libdca.c Sun Oct 7 17:06:53 2007
@@ -52,7 +52,7 @@ LIBAD_EXTERN(libdca)
static const char ch2flags[6] = {
DTS_MONO,
DTS_STEREO,
- DTS_2F1R,
+ DTS_3F,
DTS_2F2R,
DTS_3F2R,
DTS_3F2R | DTS_LFE
@@ -90,10 +90,9 @@ static void convert2s16_multi(sample_t *
break;
case DTS_3F:
for(i = 0; i < 256; i++){
- s16[5*i] = convert(f[i]);
- s16[5*i+1] = convert(f[i+512]);
- s16[5*i+2] = s16[5*i+3] = 0;
- s16[5*i+4] = convert(f[i+256]);
+ s16[3*i] = convert(f[i+256]);
+ s16[3*i+1] = convert(f[i+512]);
+ s16[3*i+2] = convert(f[i]);
}
break;
case DTS_2F2R:
@@ -106,57 +105,57 @@ static void convert2s16_multi(sample_t *
break;
case DTS_3F2R:
for(i = 0; i < 256; i++){
- s16[5*i] = convert(f[i]);
+ s16[5*i] = convert(f[i+256]);
s16[5*i+1] = convert(f[i+512]);
s16[5*i+2] = convert(f[i+768]);
s16[5*i+3] = convert(f[i+1024]);
- s16[5*i+4] = convert(f[i+256]);
+ s16[5*i+4] = convert(f[i]);
}
break;
case DTS_MONO | DTS_LFE:
for(i = 0; i < 256; i++){
s16[6*i] = s16[6*i+1] = s16[6*i+2] = s16[6*i+3] = 0;
- s16[6*i+4] = convert(f[i+256]);
- s16[6*i+5] = convert(f[i]);
+ s16[6*i+4] = convert(f[i]);
+ s16[6*i+5] = convert(f[i+256]);
}
break;
case DTS_CHANNEL | DTS_LFE:
case DTS_STEREO | DTS_LFE:
case DTS_DOLBY | DTS_LFE:
for(i = 0; i < 256; i++){
- s16[6*i] = convert(f[i+256]);
- s16[6*i+1] = convert(f[i+512]);
+ s16[6*i] = convert(f[i]);
+ s16[6*i+1] = convert(f[i+256]);
s16[6*i+2] = s16[6*i+3] = s16[6*i+4] = 0;
- s16[6*i+5] = convert(f[i]);
+ s16[6*i+5] = convert(f[i+512]);
}
break;
case DTS_3F | DTS_LFE:
for(i = 0; i < 256; i++){
s16[6*i] = convert(f[i+256]);
- s16[6*i+1] = convert(f[i+768]);
+ s16[6*i+1] = convert(f[i+512]);
s16[6*i+2] = s16[6*i+3] = 0;
- s16[6*i+4] = convert(f[i+512]);
- s16[6*i+5] = convert(f[i]);
+ s16[6*i+4] = convert(f[i]);
+ s16[6*i+5] = convert(f[i+768]);
}
break;
case DTS_2F2R | DTS_LFE:
for(i = 0; i < 256; i++){
- s16[6*i] = convert(f[i+256]);
- s16[6*i+1] = convert(f[i+512]);
- s16[6*i+2] = convert(f[i+768]);
- s16[6*i+3] = convert(f[i+1024]);
+ s16[6*i] = convert(f[i]);
+ s16[6*i+1] = convert(f[i+256]);
+ s16[6*i+2] = convert(f[i+512]);
+ s16[6*i+3] = convert(f[i+768]);
s16[6*i+4] = 0;
- s16[6*i+5] = convert(f[i]);
+ s16[6*i+5] = convert(f[1024]);
}
break;
case DTS_3F2R | DTS_LFE:
for(i = 0; i < 256; i++){
s16[6*i] = convert(f[i+256]);
- s16[6*i+1] = convert(f[i+768]);
- s16[6*i+2] = convert(f[i+1024]);
- s16[6*i+3] = convert(f[i+1280]);
- s16[6*i+4] = convert(f[i+512]);
- s16[6*i+5] = convert(f[i]);
+ s16[6*i+1] = convert(f[i+512]);
+ s16[6*i+2] = convert(f[i+768]);
+ s16[6*i+3] = convert(f[i+1024]);
+ s16[6*i+4] = convert(f[i]);
+ s16[6*i+5] = convert(f[i+1280]);
}
break;
}
More information about the MPlayer-cvslog
mailing list