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

Unified Diff: patched-ffmpeg-mt/libavcodec/dca.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 side-by-side diff with in-line comments
Download patch
Index: patched-ffmpeg-mt/libavcodec/dca.c
===================================================================
--- patched-ffmpeg-mt/libavcodec/dca.c (revision 41250)
+++ patched-ffmpeg-mt/libavcodec/dca.c (working copy)
@@ -32,6 +32,7 @@
#include "avcodec.h"
#include "dsputil.h"
+#include "fft.h"
#include "get_bits.h"
#include "put_bits.h"
#include "dcadata.h"
@@ -228,16 +229,16 @@
/* Subband samples history (for ADPCM) */
float subband_samples_hist[DCA_PRIM_CHANNELS_MAX][DCA_SUBBANDS][4];
- DECLARE_ALIGNED_16(float, subband_fir_hist)[DCA_PRIM_CHANNELS_MAX][512];
+ DECLARE_ALIGNED(16, float, subband_fir_hist)[DCA_PRIM_CHANNELS_MAX][512];
float subband_fir_noidea[DCA_PRIM_CHANNELS_MAX][32];
int hist_index[DCA_PRIM_CHANNELS_MAX];
- DECLARE_ALIGNED_16(float, raXin)[32];
+ DECLARE_ALIGNED(16, float, raXin)[32];
int output; ///< type of output
float add_bias; ///< output bias
float scale_bias; ///< output scale
- DECLARE_ALIGNED_16(float, samples)[1536]; /* 6 * 256 = 1536, might only need 5 */
+ DECLARE_ALIGNED(16, float, samples)[1536]; /* 6 * 256 = 1536, might only need 5 */
const float *samples_chanptr[6];
uint8_t dca_buffer[DCA_MAX_FRAME_SIZE];
@@ -1244,6 +1245,10 @@
} else
s->channel_order_tab = dca_channel_reorder_nolfe[s->amode];
+ if (s->prim_channels > 0 &&
+ s->channel_order_tab[s->prim_channels - 1] < 0)
+ return -1;
+
if(avctx->request_channels == 2 && s->prim_channels > 2) {
channels = 2;
s->output = DCA_STEREO;

Powered by Google App Engine
This is Rietveld 408576698