comparison ac3_parser.c @ 5331:b24bcdd0ae86 libavcodec

move some common values to ac3.h and utilize them
author jbr
date Sun, 15 Jul 2007 01:31:09 +0000
parents b42e963c8149
children 5ae5a74b0e4b
comparison
equal deleted inserted replaced
5330:37de2d864f03 5331:b24bcdd0ae86
62 62
63 skip_bits(&gbc, 5); // skip bsid, already got it 63 skip_bits(&gbc, 5); // skip bsid, already got it
64 64
65 hdr->bsmod = get_bits(&gbc, 3); 65 hdr->bsmod = get_bits(&gbc, 3);
66 hdr->acmod = get_bits(&gbc, 3); 66 hdr->acmod = get_bits(&gbc, 3);
67 if((hdr->acmod & 1) && hdr->acmod != 1) { 67 if((hdr->acmod & 1) && hdr->acmod != AC3_ACMOD_MONO) {
68 hdr->cmixlev = get_bits(&gbc, 2); 68 hdr->cmixlev = get_bits(&gbc, 2);
69 } 69 }
70 if(hdr->acmod & 4) { 70 if(hdr->acmod & 4) {
71 hdr->surmixlev = get_bits(&gbc, 2); 71 hdr->surmixlev = get_bits(&gbc, 2);
72 } 72 }
73 if(hdr->acmod == 2) { 73 if(hdr->acmod == AC3_ACMOD_STEREO) {
74 hdr->dsurmod = get_bits(&gbc, 2); 74 hdr->dsurmod = get_bits(&gbc, 2);
75 } 75 }
76 hdr->lfeon = get_bits1(&gbc); 76 hdr->lfeon = get_bits1(&gbc);
77 77
78 hdr->halfratecod = FFMAX(hdr->bsid, 8) - 8; 78 hdr->halfratecod = FFMAX(hdr->bsid, 8) - 8;