On 12/02/2011 10:54 AM, Chris Berov wrote:
> ac3dec.c cosmetic changes.
>
>
> 0001-ac3dec-cosmetics-pretty-printing.patch
>
>
> From c8e39d9febe7eec5773575532a105bab48e60bb9 Mon Sep 17 00:00:00 2001
> From: unknown <[email protected]>
> Date: Fri, 2 Dec 2011 17:46:01 +0200
> Subject: [PATCH] ac3dec: cosmetics: pretty-printing
>
> ---
> libavcodec/ac3dec.c | 275
> +++++++++++++++++++++++++++------------------------
> 1 files changed, 146 insertions(+), 129 deletions(-)
>
[...]
> @@ -411,7 +412,8 @@ static void calc_transform_coeffs_cpl(AC3DecodeContext *s)
> if (s->channel_in_cpl[ch]) {
> int cpl_coord = s->cpl_coords[ch][band] << 5;
> for (bin = band_start; bin < band_end; bin++) {
> - s->fixed_coeffs[ch][bin] =
> MULH(s->fixed_coeffs[CPL_CH][bin] << 4, cpl_coord);
> + s->fixed_coeffs[ch][bin] =
> + MULH(s->fixed_coeffs[CPL_CH][bin] << 4, cpl_coord);
the 2nd line needs to be indented by 4.
> @@ -442,15 +444,15 @@ typedef struct {
> static void ac3_decode_transform_coeffs_ch(AC3DecodeContext *s, int
> ch_index, mant_groups *m)
> {
> int start_freq = s->start_freq[ch_index];
> - int end_freq = s->end_freq[ch_index];
> - uint8_t *baps = s->bap[ch_index];
> - int8_t *exps = s->dexps[ch_index];
> - int *coeffs = s->fixed_coeffs[ch_index];
> - int dither = (ch_index == CPL_CH) || s->dither_flag[ch_index];
> + int end_freq = s->end_freq[ch_index];
> + uint8_t *baps = s->bap[ch_index];
> + int8_t *exps = s->dexps[ch_index];
> + int *coeffs = s->fixed_coeffs[ch_index];
> + int dither = (ch_index == CPL_CH) || s->dither_flag[ch_index];
> GetBitContext *gbc = &s->gbc;
> int freq;
>
> - for(freq = start_freq; freq < end_freq; freq++){
> + for (freq = start_freq; freq < end_freq; freq++){
needs a space before the {
> @@ -461,7 +463,7 @@ static void
> ac3_decode_transform_coeffs_ch(AC3DecodeContext *s, int ch_index, ma
> mantissa = 0;
> break;
> case 1:
> - if(m->b1){
> + if (m->b1){
ditto
> m->b1--;
> mantissa = m->b1_mant[m->b1];
> }
> @@ -474,7 +476,7 @@ static void
> ac3_decode_transform_coeffs_ch(AC3DecodeContext *s, int ch_index, ma
> }
> break;
> case 2:
> - if(m->b2){
> + if (m->b2){
ditto
> m->b2--;
> mantissa = m->b2_mant[m->b2];
> }
> @@ -490,7 +492,7 @@ static void
> ac3_decode_transform_coeffs_ch(AC3DecodeContext *s, int ch_index, ma
> mantissa = b3_mantissas[get_bits(gbc, 3)];
> break;
> case 4:
> - if(m->b4){
> + if (m->b4){
ditto
> /* signal-to-noise ratio offsets and fast gains (signal-to-mask ratios)
> */
> - if(!s->eac3 || !blk){
> - if(s->snr_offset_strategy && get_bits1(gbc)) {
> + if (!s->eac3 || !blk){
here too
> @@ -1149,14 +1159,15 @@ static int decode_audio_block(AC3DecodeContext *s,
> int blk)
> int sl = get_bits(gbc, 3);
> /* run last 2 bit allocation stages for coupling channel if
> coupling leak changes */
> - if(blk && (fl != s->bit_alloc_params.cpl_fast_leak ||
> + if (blk && (fl != s->bit_alloc_params.cpl_fast_leak ||
> sl != s->bit_alloc_params.cpl_slow_leak)) {
align the next line vertically too
Thanks,
Justin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel