They were duplicating LOCAL_ALIGNED() without benefit. --- configure | 8 +++----- libavcodec/aacps.c | 6 +++--- libavcodec/aacsbr.c | 6 +++--- libavcodec/ac3enc.c | 2 +- libavcodec/ac3enc_template.c | 4 ++-- libavcodec/bink.c | 10 +++++----- libavcodec/dcadec.c | 2 +- libavcodec/dnxhdenc.c | 2 +- libavcodec/dvdec.c | 6 +++--- libavcodec/dvenc.c | 4 ++-- libavcodec/imc.c | 2 +- libavcodec/ituh263dec.c | 2 +- libavcodec/me_cmp.c | 16 ++++++++-------- libavcodec/mips/aacsbr_mips.c | 6 +++--- libavcodec/mpc7.c | 2 +- libavcodec/mpegvideo_enc.c | 2 +- libavcodec/mpegvideo_motion.c | 2 +- libavcodec/ppc/mpegaudiodsp_altivec.c | 8 ++++---- libavcodec/proresdec2.c | 6 +++--- libavcodec/rv34.c | 4 ++-- libavcodec/vp9.c | 4 ++-- libavcodec/x86/hevcdsp_init.c | 4 ++-- libavcodec/x86/mpegaudiodsp.c | 10 +++++----- libavcodec/x86/mpegvideoenc_template.c | 2 +- libavcodec/x86/simple_idct.c | 2 +- libavcodec/x86/vp9dsp_init.c | 2 +- libavutil/internal.h | 20 +++----------------- 27 files changed, 64 insertions(+), 80 deletions(-)
diff --git a/configure b/configure index 7ade46d..2bac433 100755 --- a/configure +++ b/configure @@ -1609,9 +1609,7 @@ ARCH_FEATURES=" fast_64bit fast_clz fast_cmov - local_aligned_8 - local_aligned_16 - local_aligned_32 + local_aligned simd_align_16 " @@ -4611,7 +4609,7 @@ elif enabled parisc; then elif enabled ppc; then - enable local_aligned_8 local_aligned_16 local_aligned_32 + enable local_aligned check_inline_asm dcbzl '"dcbzl 0, %0" :: "r"(0)' check_inline_asm ibm_asm '"add 0, 0, 0"' @@ -4646,7 +4644,7 @@ elif enabled x86; then check_builtin rdtsc intrin.h "__rdtsc()" check_builtin mm_empty mmintrin.h "_mm_empty()" - enable local_aligned_8 local_aligned_16 local_aligned_32 + enable local_aligned # check whether EBP is available on x86 # As 'i' is stored on the stack, this program will crash diff --git a/libavcodec/aacps.c b/libavcodec/aacps.c index ea5a5d2..2d00473 100644 --- a/libavcodec/aacps.c +++ b/libavcodec/aacps.c @@ -327,7 +327,7 @@ static void hybrid6_cx(PSDSPContext *dsp, float (*in)[2], float (*out)[32][2], { int i; int N = 8; - LOCAL_ALIGNED_16(float, temp, [8], [2]); + LOCAL_ALIGNED(16, float, temp, [8], [2]); for (i = 0; i < len; i++, in++) { dsp->hybrid_analysis(temp, in, (const float (*)[8][2]) filter, 1, N); @@ -628,8 +628,8 @@ static void map_val_20_to_34(float par[PS_MAX_NR_IIDICC]) static void decorrelation(PSContext *ps, float (*out)[32][2], const float (*s)[32][2], int is34) { - LOCAL_ALIGNED_16(float, power, [34], [PS_QMF_TIME_SLOTS]); - LOCAL_ALIGNED_16(float, transient_gain, [34], [PS_QMF_TIME_SLOTS]); + LOCAL_ALIGNED(16, float, power, [34], [PS_QMF_TIME_SLOTS]); + LOCAL_ALIGNED(16, float, transient_gain, [34], [PS_QMF_TIME_SLOTS]); float *peak_decay_nrg = ps->peak_decay_nrg; float *power_smooth = ps->power_smooth; float *peak_decay_diff_smooth = ps->peak_decay_diff_smooth; diff --git a/libavcodec/aacsbr.c b/libavcodec/aacsbr.c index 94a5685..bf60736 100644 --- a/libavcodec/aacsbr.c +++ b/libavcodec/aacsbr.c @@ -1260,7 +1260,7 @@ static void sbr_hf_inverse_filter(SBRDSPContext *dsp, { int k; for (k = 0; k < k0; k++) { - LOCAL_ALIGNED_16(float, phi, [3], [2][2]); + LOCAL_ALIGNED(16, float, phi, [3], [2][2]); float dk; dsp->autocorrelate(X_low[k], phi); @@ -1631,8 +1631,8 @@ static void sbr_hf_assemble(float Y1[38][64][2], for (e = 0; e < ch_data->bs_num_env; e++) { for (i = 2 * ch_data->t_env[e]; i < 2 * ch_data->t_env[e + 1]; i++) { - LOCAL_ALIGNED_16(float, g_filt_tab, [48]); - LOCAL_ALIGNED_16(float, q_filt_tab, [48]); + LOCAL_ALIGNED(16, float, g_filt_tab, [48]); + LOCAL_ALIGNED(16, float, q_filt_tab, [48]); float *g_filt, *q_filt; if (h_SL && e != e_a[0] && e != e_a[1]) { diff --git a/libavcodec/ac3enc.c b/libavcodec/ac3enc.c index dc52908..b3db2df 100644 --- a/libavcodec/ac3enc.c +++ b/libavcodec/ac3enc.c @@ -1037,7 +1037,7 @@ static void count_mantissa_bits_update_ch(AC3EncodeContext *s, int ch, static int count_mantissa_bits(AC3EncodeContext *s) { int ch, max_end_freq; - LOCAL_ALIGNED_16(uint16_t, mant_cnt, [AC3_MAX_BLOCKS], [16]); + LOCAL_ALIGNED(16, uint16_t, mant_cnt, [AC3_MAX_BLOCKS], [16]); count_mantissa_bits_init(mant_cnt); diff --git a/libavcodec/ac3enc_template.c b/libavcodec/ac3enc_template.c index c3ad76f..90438ce 100644 --- a/libavcodec/ac3enc_template.c +++ b/libavcodec/ac3enc_template.c @@ -130,9 +130,9 @@ static void apply_mdct(AC3EncodeContext *s) */ static void apply_channel_coupling(AC3EncodeContext *s) { - LOCAL_ALIGNED_16(CoefType, cpl_coords, [AC3_MAX_BLOCKS], [AC3_MAX_CHANNELS][16]); + LOCAL_ALIGNED(16, CoefType, cpl_coords, [AC3_MAX_BLOCKS], [AC3_MAX_CHANNELS][16]); #if CONFIG_AC3ENC_FLOAT - LOCAL_ALIGNED_16(int32_t, fixed_cpl_coords, [AC3_MAX_BLOCKS], [AC3_MAX_CHANNELS][16]); + LOCAL_ALIGNED(16, int32_t, fixed_cpl_coords, [AC3_MAX_BLOCKS], [AC3_MAX_CHANNELS][16]); #else int32_t (*fixed_cpl_coords)[AC3_MAX_CHANNELS][16] = cpl_coords; #endif diff --git a/libavcodec/bink.c b/libavcodec/bink.c index bc3d25c..5e5c9c5 100644 --- a/libavcodec/bink.c +++ b/libavcodec/bink.c @@ -813,8 +813,8 @@ static int binkb_decode_plane(BinkContext *c, AVFrame *frame, GetBitContext *gb, int v, col[2]; const uint8_t *scan; int xoff, yoff; - LOCAL_ALIGNED_16(int16_t, block, [64]); - LOCAL_ALIGNED_16(int32_t, dctblock, [64]); + LOCAL_ALIGNED(16, int16_t, block, [64]); + LOCAL_ALIGNED(16, int32_t, dctblock, [64]); int coordmap[64]; int ybias = is_key ? -15 : 0; int qp; @@ -959,9 +959,9 @@ static int bink_decode_plane(BinkContext *c, AVFrame *frame, GetBitContext *gb, int v, col[2]; const uint8_t *scan; int xoff, yoff; - LOCAL_ALIGNED_16(int16_t, block, [64]); - LOCAL_ALIGNED_16(uint8_t, ublock, [64]); - LOCAL_ALIGNED_16(int32_t, dctblock, [64]); + LOCAL_ALIGNED(16, int16_t, block, [64]); + LOCAL_ALIGNED(16, uint8_t, ublock, [64]); + LOCAL_ALIGNED(16, int32_t, dctblock, [64]); int coordmap[64]; const int stride = frame->linesize[plane_idx]; diff --git a/libavcodec/dcadec.c b/libavcodec/dcadec.c index d06e6d2..0d0809c 100644 --- a/libavcodec/dcadec.c +++ b/libavcodec/dcadec.c @@ -774,7 +774,7 @@ static int dca_subsubframe(DCAContext *s, int base_channel, int block_index) /* FIXME */ float (*subband_samples)[DCA_SUBBANDS][8] = s->subband_samples[block_index]; - LOCAL_ALIGNED_16(int32_t, block, [8 * DCA_SUBBANDS]); + LOCAL_ALIGNED(16, int32_t, block, [8 * DCA_SUBBANDS]); /* * Audio data diff --git a/libavcodec/dnxhdenc.c b/libavcodec/dnxhdenc.c index d7105a1..232e197 100644 --- a/libavcodec/dnxhdenc.c +++ b/libavcodec/dnxhdenc.c @@ -614,7 +614,7 @@ static int dnxhd_calc_bits_thread(AVCodecContext *avctx, void *arg, DNXHDEncContext *ctx = avctx->priv_data; int mb_y = jobnr, mb_x; int qscale = ctx->qscale; - LOCAL_ALIGNED_16(int16_t, block, [64]); + LOCAL_ALIGNED(16, int16_t, block, [64]); ctx = ctx->thread[threadnr]; ctx->m.last_dc[0] = diff --git a/libavcodec/dvdec.c b/libavcodec/dvdec.c index 388bbf2..0daa462 100644 --- a/libavcodec/dvdec.c +++ b/libavcodec/dvdec.c @@ -286,9 +286,9 @@ static int dv_decode_video_segment(AVCodecContext *avctx, void *arg) PutBitContext pb, vs_pb; GetBitContext gb; BlockInfo mb_data[5 * DV_MAX_BPM], *mb, *mb1; - LOCAL_ALIGNED_16(int16_t, sblock, [5 * DV_MAX_BPM], [64]); - LOCAL_ALIGNED_16(uint8_t, mb_bit_buffer, [80 + FF_INPUT_BUFFER_PADDING_SIZE]); /* allow some slack */ - LOCAL_ALIGNED_16(uint8_t, vs_bit_buffer, [80 * 5 + FF_INPUT_BUFFER_PADDING_SIZE]); /* allow some slack */ + LOCAL_ALIGNED(16, int16_t, sblock, [5 * DV_MAX_BPM], [64]); + LOCAL_ALIGNED(16, uint8_t, mb_bit_buffer, [80 + FF_INPUT_BUFFER_PADDING_SIZE]); /* allow some slack */ + LOCAL_ALIGNED(16, uint8_t, vs_bit_buffer, [80 * 5 + FF_INPUT_BUFFER_PADDING_SIZE]); /* allow some slack */ const int log2_blocksize = 3-s->avctx->lowres; int is_field_mode[5]; diff --git a/libavcodec/dvenc.c b/libavcodec/dvenc.c index 2442f2b..9767c6d 100644 --- a/libavcodec/dvenc.c +++ b/libavcodec/dvenc.c @@ -248,7 +248,7 @@ static av_always_inline int dv_init_enc_block(EncBlockInfo *bi, uint8_t *data, { const int *weight; const uint8_t *zigzag_scan; - LOCAL_ALIGNED_16(int16_t, blk, [64]); + LOCAL_ALIGNED(16, int16_t, blk, [64]); int i, area; /* We offer two different methods for class number assignment: the * method suggested in SMPTE 314M Table 22, and an improved @@ -425,7 +425,7 @@ static int dv_encode_video_segment(AVCodecContext *avctx, void *arg) int mb_x, mb_y, c_offset, linesize, y_stride; uint8_t *y_ptr; uint8_t *dif; - LOCAL_ALIGNED_8(uint8_t, scratch, [128]); + LOCAL_ALIGNED(8, uint8_t, scratch, [128]); EncBlockInfo enc_blks[5 * DV_MAX_BPM]; PutBitContext pbs[5 * DV_MAX_BPM]; PutBitContext *pb; diff --git a/libavcodec/imc.c b/libavcodec/imc.c index 2fa910a..1cc047e 100644 --- a/libavcodec/imc.c +++ b/libavcodec/imc.c @@ -1021,7 +1021,7 @@ static int imc_decode_frame(AVCodecContext *avctx, void *data, IMCContext *q = avctx->priv_data; - LOCAL_ALIGNED_16(uint16_t, buf16, [IMC_BLOCK_SIZE / 2 + FF_INPUT_BUFFER_PADDING_SIZE/2]); + LOCAL_ALIGNED(16, uint16_t, buf16, [IMC_BLOCK_SIZE / 2 + FF_INPUT_BUFFER_PADDING_SIZE/2]); if (buf_size < IMC_BLOCK_SIZE * avctx->channels) { av_log(avctx, AV_LOG_ERROR, "frame too small!\n"); diff --git a/libavcodec/ituh263dec.c b/libavcodec/ituh263dec.c index bf9bd34..aacbbc6 100644 --- a/libavcodec/ituh263dec.c +++ b/libavcodec/ituh263dec.c @@ -564,7 +564,7 @@ not_coded: static int h263_skip_b_part(MpegEncContext *s, int cbp) { - LOCAL_ALIGNED_16(int16_t, dblock, [64]); + LOCAL_ALIGNED(16, int16_t, dblock, [64]); int i, mbi; int bli[6]; diff --git a/libavcodec/me_cmp.c b/libavcodec/me_cmp.c index d4213d2..83c3427 100644 --- a/libavcodec/me_cmp.c +++ b/libavcodec/me_cmp.c @@ -551,7 +551,7 @@ static int hadamard8_intra8x8_c(MpegEncContext *s, uint8_t *src, static int dct_sad8x8_c(MpegEncContext *s, uint8_t *src1, uint8_t *src2, ptrdiff_t stride, int h) { - LOCAL_ALIGNED_16(int16_t, temp, [64]); + LOCAL_ALIGNED(16, int16_t, temp, [64]); av_assert2(h == 8); @@ -617,7 +617,7 @@ static int dct264_sad8x8_c(MpegEncContext *s, uint8_t *src1, static int dct_max8x8_c(MpegEncContext *s, uint8_t *src1, uint8_t *src2, ptrdiff_t stride, int h) { - LOCAL_ALIGNED_16(int16_t, temp, [64]); + LOCAL_ALIGNED(16, int16_t, temp, [64]); int sum = 0, i; av_assert2(h == 8); @@ -634,7 +634,7 @@ static int dct_max8x8_c(MpegEncContext *s, uint8_t *src1, static int quant_psnr8x8_c(MpegEncContext *s, uint8_t *src1, uint8_t *src2, ptrdiff_t stride, int h) { - LOCAL_ALIGNED_16(int16_t, temp, [64 * 2]); + LOCAL_ALIGNED(16, int16_t, temp, [64 * 2]); int16_t *const bak = temp + 64; int sum = 0, i; @@ -660,9 +660,9 @@ static int rd8x8_c(MpegEncContext *s, uint8_t *src1, uint8_t *src2, ptrdiff_t stride, int h) { const uint8_t *scantable = s->intra_scantable.permutated; - LOCAL_ALIGNED_16(int16_t, temp, [64]); - LOCAL_ALIGNED_16(uint8_t, lsrc1, [64]); - LOCAL_ALIGNED_16(uint8_t, lsrc2, [64]); + LOCAL_ALIGNED(16, int16_t, temp, [64]); + LOCAL_ALIGNED(16, uint8_t, lsrc1, [64]); + LOCAL_ALIGNED(16, uint8_t, lsrc2, [64]); int i, last, run, bits, level, distortion, start_i; const int esc_length = s->ac_esc_length; uint8_t *length, *last_length; @@ -737,7 +737,7 @@ static int bit8x8_c(MpegEncContext *s, uint8_t *src1, uint8_t *src2, ptrdiff_t stride, int h) { const uint8_t *scantable = s->intra_scantable.permutated; - LOCAL_ALIGNED_16(int16_t, temp, [64]); + LOCAL_ALIGNED(16, int16_t, temp, [64]); int i, last, run, bits, level, start_i; const int esc_length = s->ac_esc_length; uint8_t *length, *last_length; @@ -915,7 +915,7 @@ av_cold void ff_me_cmp_init_static(void) int ff_check_alignment(void) { static int did_fail = 0; - LOCAL_ALIGNED_16(int, aligned, [4]); + LOCAL_ALIGNED(16, int, aligned, [4]); if ((intptr_t)aligned & 15) { if (!did_fail) { diff --git a/libavcodec/mips/aacsbr_mips.c b/libavcodec/mips/aacsbr_mips.c index e478290..e7ae747 100644 --- a/libavcodec/mips/aacsbr_mips.c +++ b/libavcodec/mips/aacsbr_mips.c @@ -409,8 +409,8 @@ static void sbr_hf_assemble_mips(float Y1[38][64][2], for (e = 0; e < ch_data->bs_num_env; e++) { for (i = 2 * ch_data->t_env[e]; i < 2 * ch_data->t_env[e + 1]; i++) { - LOCAL_ALIGNED_16(float, g_filt_tab, [48]); - LOCAL_ALIGNED_16(float, q_filt_tab, [48]); + LOCAL_ALIGNED(16, float, g_filt_tab, [48]); + LOCAL_ALIGNED(16, float, q_filt_tab, [48]); float *g_filt, *q_filt; if (h_SL && e != e_a[0] && e != e_a[1]) { @@ -494,7 +494,7 @@ static void sbr_hf_inverse_filter_mips(SBRDSPContext *dsp, c = 1.000001f; for (k = 0; k < k0; k++) { - LOCAL_ALIGNED_16(float, phi, [3], [2][2]); + LOCAL_ALIGNED(16, float, phi, [3], [2][2]); float dk; phi1 = &phi[0][0][0]; alpha_1 = &alpha1[k][0]; diff --git a/libavcodec/mpc7.c b/libavcodec/mpc7.c index 0f1e34a..ab1a1ff 100644 --- a/libavcodec/mpc7.c +++ b/libavcodec/mpc7.c @@ -50,7 +50,7 @@ static av_cold int mpc7_decode_init(AVCodecContext * avctx) int i, j; MPCContext *c = avctx->priv_data; GetBitContext gb; - LOCAL_ALIGNED_16(uint8_t, buf, [16]); + LOCAL_ALIGNED(16, uint8_t, buf, [16]); static int vlc_initialized = 0; static VLC_TYPE scfi_table[1 << MPC7_SCFI_BITS][2]; diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index 53f584d..ea673ef 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -4095,7 +4095,7 @@ static int dct_quantize_refine(MpegEncContext *s, //FIXME breaks denoise? int16_t *block, int16_t *weight, int16_t *orig, int n, int qscale){ int16_t rem[64]; - LOCAL_ALIGNED_16(int16_t, d1, [64]); + LOCAL_ALIGNED(16, int16_t, d1, [64]); const uint8_t *scantable= s->intra_scantable.scantable; const uint8_t *perm_scantable= s->intra_scantable.permutated; // unsigned int threshold1, threshold2; diff --git a/libavcodec/mpegvideo_motion.c b/libavcodec/mpegvideo_motion.c index 4fea847..1b074e4 100644 --- a/libavcodec/mpegvideo_motion.c +++ b/libavcodec/mpegvideo_motion.c @@ -665,7 +665,7 @@ static inline void apply_obmc(MpegEncContext *s, uint8_t **ref_picture, op_pixels_func (*pix_op)[4]) { - LOCAL_ALIGNED_8(int16_t, mv_cache, [4], [4][2]); + LOCAL_ALIGNED(8, int16_t, mv_cache, [4], [4][2]); Picture *cur_frame = &s->current_picture; int mb_x = s->mb_x; int mb_y = s->mb_y; diff --git a/libavcodec/ppc/mpegaudiodsp_altivec.c b/libavcodec/ppc/mpegaudiodsp_altivec.c index ddfe5dc..4099329 100644 --- a/libavcodec/ppc/mpegaudiodsp_altivec.c +++ b/libavcodec/ppc/mpegaudiodsp_altivec.c @@ -92,10 +92,10 @@ static void apply_window(const float *buf, const float *win1, static void apply_window_mp3(float *in, float *win, int *unused, float *out, int incr) { - LOCAL_ALIGNED_16(float, suma, [17]); - LOCAL_ALIGNED_16(float, sumb, [17]); - LOCAL_ALIGNED_16(float, sumc, [17]); - LOCAL_ALIGNED_16(float, sumd, [17]); + LOCAL_ALIGNED(16, float, suma, [17]); + LOCAL_ALIGNED(16, float, sumb, [17]); + LOCAL_ALIGNED(16, float, sumc, [17]); + LOCAL_ALIGNED(16, float, sumd, [17]); float sum; int j; diff --git a/libavcodec/proresdec2.c b/libavcodec/proresdec2.c index 4d04a0a..5c712a5 100644 --- a/libavcodec/proresdec2.c +++ b/libavcodec/proresdec2.c @@ -360,7 +360,7 @@ static int decode_slice_luma(AVCodecContext *avctx, SliceContext *slice, const int16_t *qmat) { ProresContext *ctx = avctx->priv_data; - LOCAL_ALIGNED_16(int16_t, blocks, [8*4*64]); + LOCAL_ALIGNED(16, int16_t, blocks, [8*4*64]); int16_t *block; GetBitContext gb; int i, blocks_per_slice = slice->mb_count<<2; @@ -393,7 +393,7 @@ static int decode_slice_chroma(AVCodecContext *avctx, SliceContext *slice, const int16_t *qmat, int log2_blocks_per_mb) { ProresContext *ctx = avctx->priv_data; - LOCAL_ALIGNED_16(int16_t, blocks, [8*4*64]); + LOCAL_ALIGNED(16, int16_t, blocks, [8*4*64]); int16_t *block; GetBitContext gb; int i, j, blocks_per_slice = slice->mb_count << log2_blocks_per_mb; @@ -475,7 +475,7 @@ static void decode_slice_alpha(ProresContext *ctx, { GetBitContext gb; int i; - LOCAL_ALIGNED_16(int16_t, blocks, [8*4*64]); + LOCAL_ALIGNED(16, int16_t, blocks, [8*4*64]); int16_t *block; for (i = 0; i < blocks_per_slice<<2; i++) diff --git a/libavcodec/rv34.c b/libavcodec/rv34.c index a232ab2..7d7e4ab 100644 --- a/libavcodec/rv34.c +++ b/libavcodec/rv34.c @@ -1024,7 +1024,7 @@ static inline void rv34_process_block(RV34DecContext *r, static void rv34_output_i16x16(RV34DecContext *r, int8_t *intra_types, int cbp) { - LOCAL_ALIGNED_16(int16_t, block16, [16]); + LOCAL_ALIGNED(16, int16_t, block16, [16]); MpegEncContext *s = &r->s; GetBitContext *gb = &s->gb; int q_dc = rv34_qscale_tab[ r->luma_dc_quant_i[s->qscale] ], @@ -1236,7 +1236,7 @@ static int rv34_decode_inter_macroblock(RV34DecContext *r, int8_t *intra_types) if(r->is16){ // Only for RV34_MB_P_MIX16x16 - LOCAL_ALIGNED_16(int16_t, block16, [16]); + LOCAL_ALIGNED(16, int16_t, block16, [16]); memset(block16, 0, 16 * sizeof(*block16)); q_dc = rv34_qscale_tab[ r->luma_dc_quant_p[s->qscale] ]; q_ac = rv34_qscale_tab[s->qscale]; diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c index 0405c05..a366cfc 100644 --- a/libavcodec/vp9.c +++ b/libavcodec/vp9.c @@ -2467,8 +2467,8 @@ static void intra_recon(AVCodecContext *ctx, ptrdiff_t y_off, ptrdiff_t uv_off) int tx = 4 * s->lossless + b->tx, uvtx = b->uvtx + 4 * s->lossless; int uvstep1d = 1 << b->uvtx, p; uint8_t *dst = s->dst[0], *dst_r = s->frames[CUR_FRAME].tf.f->data[0] + y_off; - LOCAL_ALIGNED_32(uint8_t, a_buf, [64]); - LOCAL_ALIGNED_32(uint8_t, l, [32]); + LOCAL_ALIGNED(32, uint8_t, a_buf, [64]); + LOCAL_ALIGNED(32, uint8_t, l, [32]); for (n = 0, y = 0; y < end_y; y += step1d) { uint8_t *ptr = dst, *ptr_r = dst_r; diff --git a/libavcodec/x86/hevcdsp_init.c b/libavcodec/x86/hevcdsp_init.c index ddc876d..e0f54d8 100644 --- a/libavcodec/x86/hevcdsp_init.c +++ b/libavcodec/x86/hevcdsp_init.c @@ -508,7 +508,7 @@ void ff_hevc_put_hevc_uni_w_##name##W##_##bitd##_##opt(uint8_t *_dst, ptrdiff_t int _wx, int _ox, \ intptr_t mx, intptr_t my, int width) \ { \ - LOCAL_ALIGNED_16(int16_t, temp, [71 * MAX_PB_SIZE]); \ + LOCAL_ALIGNED(16, int16_t, temp, [71 * MAX_PB_SIZE]); \ ff_hevc_put_hevc_##name##W##_##bitd##_##opt(temp, _src, _srcstride, height, mx, my, width); \ ff_hevc_put_hevc_uni_w##W##_##bitd##_##opt(_dst, _dststride, temp, height, denom, _wx, _ox);\ } @@ -567,7 +567,7 @@ void ff_hevc_put_hevc_bi_w_##name##W##_##bitd##_##opt(uint8_t *_dst, ptrdiff_t _ int _wx0, int _wx1, int _ox0, int _ox1, \ intptr_t mx, intptr_t my, int width) \ { \ - LOCAL_ALIGNED_16(int16_t, temp, [71 * MAX_PB_SIZE]); \ + LOCAL_ALIGNED(16, int16_t, temp, [71 * MAX_PB_SIZE]); \ ff_hevc_put_hevc_##name##W##_##bitd##_##opt(temp, _src, _srcstride, height, mx, my, width); \ ff_hevc_put_hevc_bi_w##W##_##bitd##_##opt(_dst, _dststride, temp, _src2, \ height, denom, _wx0, _wx1, _ox0, _ox1); \ diff --git a/libavcodec/x86/mpegaudiodsp.c b/libavcodec/x86/mpegaudiodsp.c index 2723167..16d77b9 100644 --- a/libavcodec/x86/mpegaudiodsp.c +++ b/libavcodec/x86/mpegaudiodsp.c @@ -109,10 +109,10 @@ static void apply_window(const float *buf, const float *win1, static void apply_window_mp3(float *in, float *win, int *unused, float *out, int incr) { - LOCAL_ALIGNED_16(float, suma, [17]); - LOCAL_ALIGNED_16(float, sumb, [17]); - LOCAL_ALIGNED_16(float, sumc, [17]); - LOCAL_ALIGNED_16(float, sumd, [17]); + LOCAL_ALIGNED(16, float, suma, [17]); + LOCAL_ALIGNED(16, float, sumb, [17]); + LOCAL_ALIGNED(16, float, sumc, [17]); + LOCAL_ALIGNED(16, float, sumd, [17]); float sum; @@ -199,7 +199,7 @@ static void imdct36_blocks_ ## CPU1(float *out, float *buf, float *in, \ int align_end = count - (count & 3); \ int j; \ for (j = 0; j < align_end; j+= 4) { \ - LOCAL_ALIGNED_16(float, tmpbuf, [1024]); \ + LOCAL_ALIGNED(16, float, tmpbuf, [1024]); \ float *win = mdct_win_sse[switch_point && j < 4][block_type]; \ /* apply window & overlap with previous buffer */ \ \ diff --git a/libavcodec/x86/mpegvideoenc_template.c b/libavcodec/x86/mpegvideoenc_template.c index 1899ba2..12dd491 100644 --- a/libavcodec/x86/mpegvideoenc_template.c +++ b/libavcodec/x86/mpegvideoenc_template.c @@ -105,7 +105,7 @@ static int RENAME(dct_quantize)(MpegEncContext *s, x86_reg last_non_zero_p1; int level=0, q; //=0 is because gcc says uninitialized ... const uint16_t *qmat, *bias; - LOCAL_ALIGNED_16(int16_t, temp_block, [64]); + LOCAL_ALIGNED(16, int16_t, temp_block, [64]); av_assert2((7&(int)(&temp_block[0])) == 0); //did gcc align it correctly? diff --git a/libavcodec/x86/simple_idct.c b/libavcodec/x86/simple_idct.c index 1d46212..33d4043 100644 --- a/libavcodec/x86/simple_idct.c +++ b/libavcodec/x86/simple_idct.c @@ -85,7 +85,7 @@ DECLARE_ALIGNED(8, static const int16_t, coeffs)[]= { static inline void idct(int16_t *block) { - LOCAL_ALIGNED_8(int64_t, align_tmp, [16]); + LOCAL_ALIGNED(8, int64_t, align_tmp, [16]); int16_t * const temp= (int16_t*)align_tmp; __asm__ volatile( diff --git a/libavcodec/x86/vp9dsp_init.c b/libavcodec/x86/vp9dsp_init.c index 3a30642..30aae3b 100644 --- a/libavcodec/x86/vp9dsp_init.c +++ b/libavcodec/x86/vp9dsp_init.c @@ -112,7 +112,7 @@ static void op##_8tap_##fname##_##sz##hv_##opt(uint8_t *dst, ptrdiff_t dst_strid const uint8_t *src, ptrdiff_t src_stride, \ int h, int mx, int my) \ { \ - LOCAL_ALIGNED_##align(uint8_t, temp, [71 * 64]); \ + LOCAL_ALIGNED(align, uint8_t, temp, [71 * 64]); \ ff_vp9_put_8tap_1d_h_##sz##_##opt(temp, 64, src - 3 * src_stride, src_stride, \ h + 7, ff_filters_##f_opt[f][mx - 1]); \ ff_vp9_##op##_8tap_1d_v_##sz##_##opt(dst, dst_stride, temp + 3 * 64, 64, \ diff --git a/libavutil/internal.h b/libavutil/internal.h index 08ee6e5..9ba2ea0 100644 --- a/libavutil/internal.h +++ b/libavutil/internal.h @@ -106,24 +106,10 @@ DECLARE_ALIGNED(a, t, la_##v) s o; \ t (*v) o = la_##v -#define LOCAL_ALIGNED(a, t, v, ...) E1(LOCAL_ALIGNED_A(a, t, v, __VA_ARGS__,,)) - -#if HAVE_LOCAL_ALIGNED_8 -# define LOCAL_ALIGNED_8(t, v, ...) E1(LOCAL_ALIGNED_D(8, t, v, __VA_ARGS__,,)) -#else -# define LOCAL_ALIGNED_8(t, v, ...) LOCAL_ALIGNED(8, t, v, __VA_ARGS__) -#endif - -#if HAVE_LOCAL_ALIGNED_16 -# define LOCAL_ALIGNED_16(t, v, ...) E1(LOCAL_ALIGNED_D(16, t, v, __VA_ARGS__,,)) -#else -# define LOCAL_ALIGNED_16(t, v, ...) LOCAL_ALIGNED(16, t, v, __VA_ARGS__) -#endif - -#if HAVE_LOCAL_ALIGNED_32 -# define LOCAL_ALIGNED_32(t, v, ...) E1(LOCAL_ALIGNED_D(32, t, v, __VA_ARGS__,,)) +#if HAVE_LOCAL_ALIGNED +# define LOCAL_ALIGNED(a, t, v, ...) E1(LOCAL_ALIGNED_D(a, t, v, __VA_ARGS__,,)) #else -# define LOCAL_ALIGNED_32(t, v, ...) LOCAL_ALIGNED(32, t, v, __VA_ARGS__) +# define LOCAL_ALIGNED(a, t, v, ...) E1(LOCAL_ALIGNED_A(a, t, v, __VA_ARGS__,,)) #endif #define FF_ALLOC_OR_GOTO(ctx, p, size, label)\ -- 1.9.2.msysgit.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel