[FFmpeg-devel] [PATCH] atrac1 decoder and aea demuxer
compn
tempn
Wed Sep 2 00:32:23 CEST 2009
On Tue, 01 Sep 2009 22:08:00 +0200, Benjamin Larsson wrote:
>+static float sf_tab[64];
>+DECLARE_ALIGNED_16(static float, qmf_window[48]);
>+DECLARE_ALIGNED_16(static float, short_window[ 32]);
>+DECLARE_ALIGNED_16(static float, mid_window[128]);
>+DECLARE_ALIGNED_16(static float, long_window[256]);
missing a space or needs a space to prettyprint ^^
>+static int at1_parse_block_size_mode(GetBitContext* gb, int bsm[AT1_QMF_BANDS])
>+{
>+ int bsm_tmp;
>+
>+ /* low band */
>+ bsm_tmp = get_bits(gb, 2);
>+ if (bsm_tmp&1)
>+ return -1;
>+ bsm[IDX_LOW_BAND] = 2 - bsm_tmp;
>+
>+ /* middle band */
>+ bsm_tmp = get_bits(gb, 2);
>+ if (bsm_tmp&1)
>+ return -1;
>+ bsm[IDX_MID_BAND] = 2 - bsm_tmp;
>+
>+ /* high band */
>+ bsm_tmp = get_bits(gb, 2);
>+ if (bsm_tmp != 0 && bsm_tmp != 3)
>+ return -1;
>+ bsm[IDX_HIGH_BAND] = 3 - bsm_tmp;
>+
>+ skip_bits(gb, 2);
>+ return 0;
>+}
can some of this can be factored? low and mid look the same.
>+ /* First packet starts at 0x800 */
>+ url_fskip(s->pb, 264);
>+ st->codec->channels = get_byte(s->pb);
>+ url_fskip(s->pb, 1783);
>+
>+
>+ st->codec->codec_type = CODEC_TYPE_AUDIO;
>+ st->codec->codec_id = CODEC_ID_ATRAC1;
>+ st->codec->sample_rate = 44100;
>+ st->codec->bit_rate = 292000;
only 44100 is supported?
>+
>+ if (!((st->codec->channels == 1) || (st->codec->channels == 2)))
>+ return -1;
no error message ?
ignore me if i ask stupid questions, just a quick review.
-compn
More information about the ffmpeg-devel
mailing list