Mercurial > libavcodec.hg
changeset 4542:163a74817d83 libavcodec
Don't use byte swaps and use the more portable way
of declaring aligned buffers.
author | banan |
---|---|
date | Sun, 18 Feb 2007 19:12:20 +0000 |
parents | 1c8bc533da57 |
children | d0c94a0d43ca |
files | cook.c |
diffstat | 1 files changed, 8 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/cook.c Sun Feb 18 01:37:50 2007 +0000 +++ b/cook.c Sun Feb 18 19:12:20 2007 +0000 @@ -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); } }