Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(39)

Side by Side Diff: patched-ffmpeg-mt/libavcodec/wmaprodec.c

Issue 789004: ffmpeg roll of source to mar 9 version... (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/ffmpeg/
Patch Set: '' Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Wmapro compatible decoder 2 * Wmapro compatible decoder
3 * Copyright (c) 2007 Baptiste Coudurier, Benjamin Larsson, Ulion 3 * Copyright (c) 2007 Baptiste Coudurier, Benjamin Larsson, Ulion
4 * Copyright (c) 2008 - 2009 Sascha Sommer, Benjamin Larsson 4 * Copyright (c) 2008 - 2009 Sascha Sommer, Benjamin Larsson
5 * 5 *
6 * This file is part of FFmpeg. 6 * This file is part of FFmpeg.
7 * 7 *
8 * FFmpeg is free software; you can redistribute it and/or 8 * FFmpeg is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public 9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 uint8_t grouped; ///< channel is part of a group 135 uint8_t grouped; ///< channel is part of a group
136 int quant_step; ///< quantization step for the current subframe 136 int quant_step; ///< quantization step for the current subframe
137 int8_t reuse_sf; ///< share scale factors b etween subframes 137 int8_t reuse_sf; ///< share scale factors b etween subframes
138 int8_t scale_factor_step; ///< scaling step for the current subframe 138 int8_t scale_factor_step; ///< scaling step for the current subframe
139 int max_scale_factor; ///< maximum scale factor for the current subframe 139 int max_scale_factor; ///< maximum scale factor for the current subframe
140 int saved_scale_factors[2][MAX_BANDS]; ///< resampled and (previo usly) transmitted scale factor values 140 int saved_scale_factors[2][MAX_BANDS]; ///< resampled and (previo usly) transmitted scale factor values
141 int8_t scale_factor_idx; ///< index for the transmi tted scale factor values (used for resampling) 141 int8_t scale_factor_idx; ///< index for the transmi tted scale factor values (used for resampling)
142 int* scale_factors; ///< pointer to the scale factor values used for decoding 142 int* scale_factors; ///< pointer to the scale factor values used for decoding
143 uint8_t table_idx; ///< index in sf_offsets f or the scale factor reference block 143 uint8_t table_idx; ///< index in sf_offsets f or the scale factor reference block
144 float* coeffs; ///< pointer to the subfra me decode buffer 144 float* coeffs; ///< pointer to the subfra me decode buffer
145 DECLARE_ALIGNED_16(float, out)[WMAPRO_BLOCK_MAX_SIZE + WMAPRO_BLOCK_MAX_SIZE / 2]; ///< output buffer 145 DECLARE_ALIGNED(16, float, out)[WMAPRO_BLOCK_MAX_SIZE + WMAPRO_BLOCK_MAX_SIZ E / 2]; ///< output buffer
146 } WMAProChannelCtx; 146 } WMAProChannelCtx;
147 147
148 /** 148 /**
149 * @brief channel group for channel transformations 149 * @brief channel group for channel transformations
150 */ 150 */
151 typedef struct { 151 typedef struct {
152 uint8_t num_channels; ///< number of cha nnels in the group 152 uint8_t num_channels; ///< number of cha nnels in the group
153 int8_t transform; ///< transform on / off 153 int8_t transform; ///< transform on / off
154 int8_t transform_band[MAX_BANDS]; ///< controls if t he transform is enabled for a certain band 154 int8_t transform_band[MAX_BANDS]; ///< controls if t he transform is enabled for a certain band
155 float decorrelation_matrix[WMAPRO_MAX_CHANNELS*WMAPRO_MAX_CHANNELS]; 155 float decorrelation_matrix[WMAPRO_MAX_CHANNELS*WMAPRO_MAX_CHANNELS];
156 float* channel_data[WMAPRO_MAX_CHANNELS]; ///< transformatio n coefficients 156 float* channel_data[WMAPRO_MAX_CHANNELS]; ///< transformatio n coefficients
157 } WMAProChannelGrp; 157 } WMAProChannelGrp;
158 158
159 /** 159 /**
160 * @brief main decoder context 160 * @brief main decoder context
161 */ 161 */
162 typedef struct WMAProDecodeCtx { 162 typedef struct WMAProDecodeCtx {
163 /* generic decoder variables */ 163 /* generic decoder variables */
164 AVCodecContext* avctx; ///< codec context for av_lo g 164 AVCodecContext* avctx; ///< codec context for av_lo g
165 DSPContext dsp; ///< accelerated DSP functio ns 165 DSPContext dsp; ///< accelerated DSP functio ns
166 uint8_t frame_data[MAX_FRAMESIZE + 166 uint8_t frame_data[MAX_FRAMESIZE +
167 FF_INPUT_BUFFER_PADDING_SIZE];///< compressed frame data 167 FF_INPUT_BUFFER_PADDING_SIZE];///< compressed frame data
168 PutBitContext pb; ///< context for filling the frame_data buffer 168 PutBitContext pb; ///< context for filling the frame_data buffer
169 FFTContext mdct_ctx[WMAPRO_BLOCK_SIZES]; ///< MDCT context per block size 169 FFTContext mdct_ctx[WMAPRO_BLOCK_SIZES]; ///< MDCT context per block size
170 DECLARE_ALIGNED_16(float, tmp)[WMAPRO_BLOCK_MAX_SIZE]; ///< IMDCT output buf fer 170 DECLARE_ALIGNED(16, float, tmp)[WMAPRO_BLOCK_MAX_SIZE]; ///< IMDCT output bu ffer
171 float* windows[WMAPRO_BLOCK_SIZES]; ///< windows for the differe nt block sizes 171 float* windows[WMAPRO_BLOCK_SIZES]; ///< windows for the differe nt block sizes
172 172
173 /* frame size dependent frame information (set during initialization) */ 173 /* frame size dependent frame information (set during initialization) */
174 uint32_t decode_flags; ///< used compression featur es 174 uint32_t decode_flags; ///< used compression featur es
175 uint8_t len_prefix; ///< frame is prefixed with its length 175 uint8_t len_prefix; ///< frame is prefixed with its length
176 uint8_t dynamic_range_compression; ///< frame contains DRC data 176 uint8_t dynamic_range_compression; ///< frame contains DRC data
177 uint8_t bits_per_sample; ///< integer audio sample si ze for the unscaled IMDCT output (used to scale to [-1.0, 1.0]) 177 uint8_t bits_per_sample; ///< integer audio sample si ze for the unscaled IMDCT output (used to scale to [-1.0, 1.0])
178 uint16_t samples_per_frame; ///< number of samples to ou tput 178 uint16_t samples_per_frame; ///< number of samples to ou tput
179 uint16_t log2_frame_size; 179 uint16_t log2_frame_size;
180 int8_t num_channels; ///< number of channels in t he stream (same as AVCodecContext.num_channels) 180 int8_t num_channels; ///< number of channels in t he stream (same as AVCodecContext.num_channels)
(...skipping 1387 matching lines...) Expand 10 before | Expand all | Expand 10 after
1568 CODEC_ID_WMAPRO, 1568 CODEC_ID_WMAPRO,
1569 sizeof(WMAProDecodeCtx), 1569 sizeof(WMAProDecodeCtx),
1570 decode_init, 1570 decode_init,
1571 NULL, 1571 NULL,
1572 decode_end, 1572 decode_end,
1573 decode_packet, 1573 decode_packet,
1574 .capabilities = CODEC_CAP_SUBFRAMES, 1574 .capabilities = CODEC_CAP_SUBFRAMES,
1575 .flush= flush, 1575 .flush= flush,
1576 .long_name = NULL_IF_CONFIG_SMALL("Windows Media Audio 9 Professional"), 1576 .long_name = NULL_IF_CONFIG_SMALL("Windows Media Audio 9 Professional"),
1577 }; 1577 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698