[FFmpeg-devel] [PATCH] LATM Parser & LATM/AAC Decoder
Diego Biurrun
diego
Wed Apr 22 07:41:12 CEST 2009
On Wed, Apr 22, 2009 at 04:48:46PM +1200, Paul Kendall wrote:
>
> Thanks for your comments.
> Diego, I have made the changes you suggested as well.
Not really...
> --- libavcodec/latmaac.c (revision 0)
> +++ libavcodec/latmaac.c (revision 0)
> @@ -0,0 +1,344 @@
> +
> + for (i=0; i<=bytesForValue; i++) {
extra good karma for spaces around =/<= and operators, same below
> +static void readGASpecificConfig(int audioObjectType, GetBitContext *b, PutBitContext *o)
long line, many more below
> + int dependsOnCoder;
We generally use _ instead of camel case, i.e. depends_on_coder.
> + } else if (audioObjectType == AOT_ER_AAC_LC || audioObjectType == AOT_ER_AAC_LTP
> + || audioObjectType == AOT_ER_AAC_SCALABLE || audioObjectType == AOT_ER_AAC_LD)
weird indentation
Do not mechanically indent by 4 spaces against all better judgement,
indent sanely:
} else if (audioObjectType == AOT_ER_AAC_LC || audioObjectType == AOT_ER_AAC_LTP ||
audioObjectType == AOT_ER_AAC_LD || audioObjectType == AOT_ER_AAC_SCALABLE)
same below
> +static int readAudioSyncStream(struct AACDecoder *parser, GetBitContext *b,
> + int size, uint8_t *payload, int *payloadsize)
weird indentation, more below
> + faac_cfg->downMatrix = 1;
> + faac_cfg->defSampleRate = (!avctx->sample_rate) ? 44100 : avctx->sample_rate;
align
> + faac_cfg->outputFormat = FAAD_FMT_16BIT;
> + faac_cfg->defSampleRate = (!avctx->sample_rate) ? 44100 : avctx->sample_rate;
> + faac_cfg->defObjectType = AOT_AAC_LC;
ditto
> --- libavcodec/latm_parser.c (revision 0)
> +++ libavcodec/latm_parser.c (revision 0)
> @@ -0,0 +1,112 @@
> +
> + pic_found = pc->frame_start_found;
> + state = pc->state;
align
> + pc->frame_start_found = 0;
> + pc->state = -1;
ditto
> + pc->frame_start_found = pic_found;
> + pc->state = state;
ditto
> + *poutbuf = NULL;
> + *poutbuf_size = 0;
...
> + *poutbuf = buf;
> + *poutbuf_size = buf_size;
...
Diego
More information about the ffmpeg-devel
mailing list