[Ffmpeg-cvslog] r8021 - trunk/libavcodec/cook.c
banan
subversion
Sun Feb 18 20:12:21 CET 2007
Author: banan
Date: Sun Feb 18 20:12:20 2007
New Revision: 8021
Modified:
trunk/libavcodec/cook.c
Log:
Don't use byte swaps and use the more portable way
of declaring aligned buffers.
Modified: trunk/libavcodec/cook.c
==============================================================================
--- trunk/libavcodec/cook.c (original)
+++ trunk/libavcodec/cook.c Sun Feb 18 20:12:20 2007
@@ -92,7 +92,7 @@
/* transform data */
FFTContext fft_ctx;
- FFTSample mlt_tmp[1024] __attribute__((aligned(16))); /* temporary storage for imlt */
+ DECLARE_ALIGNED_16(FFTSample, mlt_tmp[1024]); /* temporary storage for imlt */
float* mlt_window;
float* mlt_precos;
float* mlt_presin;
@@ -124,7 +124,7 @@
/* data buffers */
uint8_t* decoded_bytes_buffer;
- float mono_mdct_output[2048] __attribute__((aligned(16)));
+ DECLARE_ALIGNED_16(float,mono_mdct_output[2048]);
float mono_previous_buffer1[1024];
float mono_previous_buffer2[1024];
float decode_buffer_1[1024];
@@ -1118,14 +1118,14 @@
Swap to right endianness so we don't need to care later on. */
av_log(avctx,AV_LOG_DEBUG,"codecdata_length=%d\n",avctx->extradata_size);
if (avctx->extradata_size >= 8){
- q->cookversion = be2me_32(bytestream_get_le32(&edata_ptr));
- q->samples_per_frame = be2me_16(bytestream_get_le16(&edata_ptr));
- q->subbands = be2me_16(bytestream_get_le16(&edata_ptr));
+ q->cookversion = bytestream_get_be32(&edata_ptr);
+ q->samples_per_frame = bytestream_get_be16(&edata_ptr);
+ q->subbands = bytestream_get_be16(&edata_ptr);
}
if (avctx->extradata_size >= 16){
- bytestream_get_le32(&edata_ptr); //Unknown unused
- q->js_subband_start = be2me_16(bytestream_get_le16(&edata_ptr));
- q->js_vlc_bits = be2me_16(bytestream_get_le16(&edata_ptr));
+ bytestream_get_be32(&edata_ptr); //Unknown unused
+ q->js_subband_start = bytestream_get_be16(&edata_ptr);
+ q->js_vlc_bits = bytestream_get_be16(&edata_ptr);
}
}
More information about the ffmpeg-cvslog
mailing list