diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2007-07-15 01:31:09 +0000 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2007-07-15 01:31:09 +0000 |
commit | cc2a8443eb0501d5be2656a1a0885d96c92400b9 (patch) | |
tree | 132b1bf0f56b3f7f6fdf46866ec2ac548930e8a4 /libavcodec/ac3enc.c | |
parent | cb503702ee1db066389089840ab97c69e6e0a8dd (diff) | |
download | ffmpeg-cc2a8443eb0501d5be2656a1a0885d96c92400b9.tar.gz |
move some common values to ac3.h and utilize them
Originally committed as revision 9679 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/ac3enc.c')
-rw-r--r-- | libavcodec/ac3enc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/ac3enc.c b/libavcodec/ac3enc.c index 43154378f8..5aa415b6d6 100644 --- a/libavcodec/ac3enc.c +++ b/libavcodec/ac3enc.c @@ -453,7 +453,7 @@ static void bit_alloc_masking(AC3EncodeContext *s, 0, s->nb_coefs[ch], ff_fgaintab[s->fgaincod[ch]], ch == s->lfe_channel, - 2, 0, NULL, NULL, NULL, + DBA_NONE, 0, NULL, NULL, NULL, mask[blk][ch]); } } @@ -534,7 +534,7 @@ static int compute_bit_allocation(AC3EncodeContext *s, /* audio blocks */ for(i=0;i<NB_BLOCKS;i++) { frame_bits += s->nb_channels * 2 + 2; /* blksw * c, dithflag * c, dynrnge, cplstre */ - if (s->acmod == 2) { + if (s->acmod == AC3_ACMOD_STEREO) { frame_bits++; /* rematstr */ if(i==0) frame_bits += 4; } @@ -723,11 +723,11 @@ static void output_frame_header(AC3EncodeContext *s, unsigned char *frame) put_bits(&s->pb, 5, s->bsid); put_bits(&s->pb, 3, s->bsmod); put_bits(&s->pb, 3, s->acmod); - if ((s->acmod & 0x01) && s->acmod != 0x01) + if ((s->acmod & 0x01) && s->acmod != AC3_ACMOD_MONO) put_bits(&s->pb, 2, 1); /* XXX -4.5 dB */ if (s->acmod & 0x04) put_bits(&s->pb, 2, 1); /* XXX -6 dB */ - if (s->acmod == 0x02) + if (s->acmod == AC3_ACMOD_STEREO) put_bits(&s->pb, 2, 0); /* surround not indicated */ put_bits(&s->pb, 1, s->lfe); /* LFE */ put_bits(&s->pb, 5, 31); /* dialog norm: -31 db */ @@ -810,7 +810,7 @@ static void output_audio_block(AC3EncodeContext *s, put_bits(&s->pb, 1, 0); /* no new coupling strategy */ } - if (s->acmod == 2) + if (s->acmod == AC3_ACMOD_STEREO) { if(block_num==0) { |