@@ -937,7 +937,7 @@ static int dca_filter_channels(DCAContext *s, int block_index, int upsample)
int k;
if (upsample) {
- LOCAL_ALIGNED(32, float, samples, [DCA_SUBBANDS_X96K], [SAMPLES_PER_SUBBAND]);
+ LOCAL_ALIGNED_32(float, samples, [DCA_SUBBANDS_X96K], [SAMPLES_PER_SUBBAND]);
if (!s->qmf64_table) {
s->qmf64_table = qmf64_precompute();
@@ -962,7 +962,7 @@ static int dca_filter_channels(DCAContext *s, int block_index, int upsample)
}
} else {
/* 32 subbands QMF */
- LOCAL_ALIGNED(32, float, samples, [DCA_SUBBANDS], [SAMPLES_PER_SUBBAND]);
+ LOCAL_ALIGNED_32(float, samples, [DCA_SUBBANDS], [SAMPLES_PER_SUBBAND]);
for (k = 0; k < s->audio_header.prim_channels; k++) {
int channel = s->channel_order_tab[k];
@@ -204,7 +204,7 @@ int ff_lpc_calc_coefs(LPCContext *s,
if (lpc_type == FF_LPC_TYPE_CHOLESKY) {
LLSModel m[2];
- LOCAL_ALIGNED(32, double, var, [FFALIGN(MAX_LPC_ORDER+1,4)]);
+ LOCAL_ALIGNED_32(double, var, [FFALIGN(MAX_LPC_ORDER+1,4)]);
double av_uninit(weight);
memset(var, 0, FFALIGN(MAX_LPC_ORDER+1,4)*sizeof(*var));
@@ -136,9 +136,9 @@ static void do_hybrid_window(RA288Context *ractx,
int i;
float buffer1[MAX_BACKWARD_FILTER_ORDER + 1];
float buffer2[MAX_BACKWARD_FILTER_ORDER + 1];
- LOCAL_ALIGNED(32, float, work, [FFALIGN(MAX_BACKWARD_FILTER_ORDER +
- MAX_BACKWARD_FILTER_LEN +
- MAX_BACKWARD_FILTER_NONREC, 16)]);
+ LOCAL_ALIGNED_32(float, work, [FFALIGN(MAX_BACKWARD_FILTER_ORDER +
+ MAX_BACKWARD_FILTER_LEN +
+ MAX_BACKWARD_FILTER_NONREC, 16)]);
ractx->fdsp.vector_fmul(work, window, hist, FFALIGN(order + n + non_rec, 16));
@@ -38,6 +38,7 @@
#include "attributes.h"
#include "dict.h"
#include "macros.h"
+#include "mem.h"
#include "pixfmt.h"
#if ARCH_X86
@@ -85,8 +85,8 @@ static int compare_doubles(const double *a, const double *b, int len,
static int test_vector_fmul(AVFloatDSPContext *fdsp, AVFloatDSPContext *cdsp,
const float *v1, const float *v2)
{
- LOCAL_ALIGNED(32, float, cdst, [LEN]);
- LOCAL_ALIGNED(32, float, odst, [LEN]);
+ LOCAL_ALIGNED_32(float, cdst, [LEN]);
+ LOCAL_ALIGNED_32(float, odst, [LEN]);
int ret;
cdsp->vector_fmul(cdst, v1, v2, LEN);
@@ -102,8 +102,8 @@ static int test_vector_fmul(AVFloatDSPContext *fdsp, AVFloatDSPContext *cdsp,
static int test_vector_fmac_scalar(AVFloatDSPContext *fdsp, AVFloatDSPContext *cdsp,
const float *v1, const float *src0, float scale)
{
- LOCAL_ALIGNED(32, float, cdst, [LEN]);
- LOCAL_ALIGNED(32, float, odst, [LEN]);
+ LOCAL_ALIGNED_32(float, cdst, [LEN]);
+ LOCAL_ALIGNED_32(float, odst, [LEN]);
int ret;
memcpy(cdst, v1, LEN * sizeof(*v1));
@@ -121,8 +121,8 @@ static int test_vector_fmac_scalar(AVFloatDSPContext *fdsp, AVFloatDSPContext *c
static int test_vector_fmul_scalar(AVFloatDSPContext *fdsp, AVFloatDSPContext *cdsp,
const float *v1, float scale)
{
- LOCAL_ALIGNED(32, float, cdst, [LEN]);
- LOCAL_ALIGNED(32, float, odst, [LEN]);
+ LOCAL_ALIGNED_32(float, cdst, [LEN]);
+ LOCAL_ALIGNED_32(float, odst, [LEN]);
int ret;
cdsp->vector_fmul_scalar(cdst, v1, scale, LEN);
@@ -137,8 +137,8 @@ static int test_vector_fmul_scalar(AVFloatDSPContext *fdsp, AVFloatDSPContext *c
static int test_vector_dmul_scalar(AVFloatDSPContext *fdsp, AVFloatDSPContext *cdsp,
const double *v1, double scale)
{
- LOCAL_ALIGNED(32, double, cdst, [LEN]);
- LOCAL_ALIGNED(32, double, odst, [LEN]);
+ LOCAL_ALIGNED_32(double, cdst, [LEN]);
+ LOCAL_ALIGNED_32(double, odst, [LEN]);
int ret;
cdsp->vector_dmul_scalar(cdst, v1, scale, LEN);
@@ -154,8 +154,8 @@ static int test_vector_dmul_scalar(AVFloatDSPContext *fdsp, AVFloatDSPContext *c
static int test_vector_fmul_window(AVFloatDSPContext *fdsp, AVFloatDSPContext *cdsp,
const float *v1, const float *v2, const float *v3)
{
- LOCAL_ALIGNED(32, float, cdst, [LEN]);
- LOCAL_ALIGNED(32, float, odst, [LEN]);
+ LOCAL_ALIGNED_32(float, cdst, [LEN]);
+ LOCAL_ALIGNED_32(float, odst, [LEN]);
int ret;
cdsp->vector_fmul_window(cdst, v1, v2, v3, LEN / 2);
@@ -171,8 +171,8 @@ static int test_vector_fmul_window(AVFloatDSPContext *fdsp, AVFloatDSPContext *c
static int test_vector_fmul_add(AVFloatDSPContext *fdsp, AVFloatDSPContext *cdsp,
const float *v1, const float *v2, const float *v3)
{
- LOCAL_ALIGNED(32, float, cdst, [LEN]);
- LOCAL_ALIGNED(32, float, odst, [LEN]);
+ LOCAL_ALIGNED_32(float, cdst, [LEN]);
+ LOCAL_ALIGNED_32(float, odst, [LEN]);
int ret;
cdsp->vector_fmul_add(cdst, v1, v2, v3, LEN);
@@ -187,8 +187,8 @@ static int test_vector_fmul_add(AVFloatDSPContext *fdsp, AVFloatDSPContext *cdsp
static int test_vector_fmul_reverse(AVFloatDSPContext *fdsp, AVFloatDSPContext *cdsp,
const float *v1, const float *v2)
{
- LOCAL_ALIGNED(32, float, cdst, [LEN]);
- LOCAL_ALIGNED(32, float, odst, [LEN]);
+ LOCAL_ALIGNED_32(float, cdst, [LEN]);
+ LOCAL_ALIGNED_32(float, odst, [LEN]);
int ret;
cdsp->vector_fmul_reverse(cdst, v1, v2, LEN);
@@ -203,10 +203,10 @@ static int test_vector_fmul_reverse(AVFloatDSPContext *fdsp, AVFloatDSPContext *
static int test_butterflies_float(AVFloatDSPContext *fdsp, AVFloatDSPContext *cdsp,
const float *v1, const float *v2)
{
- LOCAL_ALIGNED(32, float, cv1, [LEN]);
- LOCAL_ALIGNED(32, float, cv2, [LEN]);
- LOCAL_ALIGNED(32, float, ov1, [LEN]);
- LOCAL_ALIGNED(32, float, ov2, [LEN]);
+ LOCAL_ALIGNED_32(float, cv1, [LEN]);
+ LOCAL_ALIGNED_32(float, cv2, [LEN]);
+ LOCAL_ALIGNED_32(float, ov1, [LEN]);
+ LOCAL_ALIGNED_32(float, ov2, [LEN]);
int ret;
memcpy(cv1, v1, LEN * sizeof(*v1));
@@ -247,11 +247,11 @@ int main(int argc, char **argv)
AVFloatDSPContext fdsp, cdsp;
AVLFG lfg;
- LOCAL_ALIGNED(32, float, src0, [LEN]);
- LOCAL_ALIGNED(32, float, src1, [LEN]);
- LOCAL_ALIGNED(32, float, src2, [LEN]);
- LOCAL_ALIGNED(32, double, dbl_src0, [LEN]);
- LOCAL_ALIGNED(32, double, dbl_src1, [LEN]);
+ LOCAL_ALIGNED_32(float, src0, [LEN]);
+ LOCAL_ALIGNED_32(float, src1, [LEN]);
+ LOCAL_ALIGNED_32(float, src2, [LEN]);
+ LOCAL_ALIGNED_32(double, dbl_src0, [LEN]);
+ LOCAL_ALIGNED_32(double, dbl_src1, [LEN]);
if (argc > 2 && !strcmp(argv[1], "-s"))
seed = strtoul(argv[2], NULL, 10);
@@ -33,7 +33,7 @@ int main(void)
avpriv_init_lls(&m, 3);
for (i = 0; i < 100; i++) {
- LOCAL_ALIGNED(32, double, var, [4]);
+ LOCAL_ALIGNED_32(double, var, [4]);
double eval;
var[0] = (av_lfg_get(&lfg) / (double) UINT_MAX - 0.5) * 2;
@@ -55,8 +55,8 @@ void checkasm_check_audiodsp(void)
ff_audiodsp_init(&adsp);
if (check_func(adsp.scalarproduct_int16, "audiodsp.scalarproduct_int16")) {
- LOCAL_ALIGNED(32, int16_t, v1, [MAX_SIZE]);
- LOCAL_ALIGNED(32, int16_t, v2, [MAX_SIZE]);
+ LOCAL_ALIGNED_32(int16_t, v1, [MAX_SIZE]);
+ LOCAL_ALIGNED_32(int16_t, v2, [MAX_SIZE]);
unsigned int len_bits_minus4, v1_bits, v2_bits, len;
int32_t res0, res1;
@@ -83,9 +83,9 @@ void checkasm_check_audiodsp(void)
}
if (check_func(adsp.vector_clip_int32, "audiodsp.vector_clip_int32")) {
- LOCAL_ALIGNED(32, int32_t, src, [MAX_SIZE]);
- LOCAL_ALIGNED(32, int32_t, dst0, [MAX_SIZE]);
- LOCAL_ALIGNED(32, int32_t, dst1, [MAX_SIZE]);
+ LOCAL_ALIGNED_32(int32_t, src, [MAX_SIZE]);
+ LOCAL_ALIGNED_32(int32_t, dst0, [MAX_SIZE]);
+ LOCAL_ALIGNED_32(int32_t, dst1, [MAX_SIZE]);
int32_t val1, val2, min, max;
int len;
@@ -113,9 +113,9 @@ void checkasm_check_audiodsp(void)
}
if (check_func(adsp.vector_clipf, "audiodsp.vector_clipf")) {
- LOCAL_ALIGNED(32, float, src, [MAX_SIZE]);
- LOCAL_ALIGNED(32, float, dst0, [MAX_SIZE]);
- LOCAL_ALIGNED(32, float, dst1, [MAX_SIZE]);
+ LOCAL_ALIGNED_32(float, src, [MAX_SIZE]);
+ LOCAL_ALIGNED_32(float, dst0, [MAX_SIZE]);
+ LOCAL_ALIGNED_32(float, dst1, [MAX_SIZE]);
float val1, val2, min, max;
int i, len;
@@ -44,9 +44,9 @@
void checkasm_check_fmtconvert(void)
{
FmtConvertContext c;
- LOCAL_ALIGNED(32, float, dst0, [BUF_SIZE]);
- LOCAL_ALIGNED(32, float, dst1, [BUF_SIZE]);
- LOCAL_ALIGNED(32, int32_t, in, [BUF_SIZE]);
+ LOCAL_ALIGNED_32(float, dst0, [BUF_SIZE]);
+ LOCAL_ALIGNED_32(float, dst1, [BUF_SIZE]);
+ LOCAL_ALIGNED_32(int32_t, in, [BUF_SIZE]);
float scale_arr[128];
int length[] = {8, 16, 24, 56, 72, 128, 512, 520, 656, 768, 992};
int i, j;
@@ -45,10 +45,10 @@
static void check_add_res(HEVCDSPContext h, int bit_depth)
{
int i;
- LOCAL_ALIGNED(32, int16_t, res0, [32 * 32]);
- LOCAL_ALIGNED(32, int16_t, res1, [32 * 32]);
- LOCAL_ALIGNED(32, uint8_t, dst0, [32 * 32 * 2]);
- LOCAL_ALIGNED(32, uint8_t, dst1, [32 * 32 * 2]);
+ LOCAL_ALIGNED_32(int16_t, res0, [32 * 32]);
+ LOCAL_ALIGNED_32(int16_t, res1, [32 * 32]);
+ LOCAL_ALIGNED_32(uint8_t, dst0, [32 * 32 * 2]);
+ LOCAL_ALIGNED_32(uint8_t, dst1, [32 * 32 * 2]);
for (i = 2; i <= 5; i++) {
int block_size = 1 << i;
@@ -38,8 +38,8 @@
static void check_idct(HEVCDSPContext h, int bit_depth)
{
int i;
- LOCAL_ALIGNED(32, int16_t, coeffs0, [32 * 32]);
- LOCAL_ALIGNED(32, int16_t, coeffs1, [32 * 32]);
+ LOCAL_ALIGNED_32(int16_t, coeffs0, [32 * 32]);
+ LOCAL_ALIGNED_32(int16_t, coeffs1, [32 * 32]);
for (i = 2; i <= 5; i++) {
int block_size = 1 << i;
@@ -62,8 +62,8 @@ static void check_idct(HEVCDSPContext h, int bit_depth)
static void check_idct_dc(HEVCDSPContext h, int bit_depth)
{
int i;
- LOCAL_ALIGNED(32, int16_t, coeffs0, [32 * 32]);
- LOCAL_ALIGNED(32, int16_t, coeffs1, [32 * 32]);
+ LOCAL_ALIGNED_32(int16_t, coeffs0, [32 * 32]);
+ LOCAL_ALIGNED_32(int16_t, coeffs1, [32 * 32]);
for (i = 2; i <= 5; i++) {
int block_size = 1 << i;
@@ -50,16 +50,16 @@ void checkasm_check_synth_filter(void)
ff_synth_filter_init(&synth);
if (check_func(synth.synth_filter_float, "synth_filter_float")) {
- LOCAL_ALIGNED(32, float, out0, [BUF_SIZE]);
- LOCAL_ALIGNED(32, float, out1, [BUF_SIZE]);
- LOCAL_ALIGNED(32, float, out_b, [BUF_SIZE]);
- LOCAL_ALIGNED(32, float, in, [BUF_SIZE]);
- LOCAL_ALIGNED(32, float, buf2_0, [BUF_SIZE]);
- LOCAL_ALIGNED(32, float, buf2_1, [BUF_SIZE]);
- LOCAL_ALIGNED(32, float, buf2_b, [BUF_SIZE]);
- LOCAL_ALIGNED(32, float, buf0, [512]);
- LOCAL_ALIGNED(32, float, buf1, [512]);
- LOCAL_ALIGNED(32, float, buf_b, [512]);
+ LOCAL_ALIGNED_32(float, out0, [BUF_SIZE]);
+ LOCAL_ALIGNED_32(float, out1, [BUF_SIZE]);
+ LOCAL_ALIGNED_32(float, out_b, [BUF_SIZE]);
+ LOCAL_ALIGNED_32(float, in, [BUF_SIZE]);
+ LOCAL_ALIGNED_32(float, buf2_0, [BUF_SIZE]);
+ LOCAL_ALIGNED_32(float, buf2_1, [BUF_SIZE]);
+ LOCAL_ALIGNED_32(float, buf2_b, [BUF_SIZE]);
+ LOCAL_ALIGNED_32(float, buf0, [512]);
+ LOCAL_ALIGNED_32(float, buf1, [512]);
+ LOCAL_ALIGNED_32(float, buf_b, [512]);
float scale = 1.0f;
int i, offset0 = 0, offset1 = 0, offset_b = 0;
@@ -248,12 +248,12 @@ static int iszero(const int16_t *c, int sz)
static void check_itxfm(void)
{
LOCAL_ALIGNED_32(uint8_t, src, [32 * 32 * 2]);
- LOCAL_ALIGNED(32, uint8_t, dst, [32 * 32 * 2]);
- LOCAL_ALIGNED(32, uint8_t, dst0, [32 * 32 * 2]);
- LOCAL_ALIGNED(32, uint8_t, dst1, [32 * 32 * 2]);
- LOCAL_ALIGNED(32, int16_t, coef, [32 * 32 * 2]);
- LOCAL_ALIGNED(32, int16_t, subcoef0, [32 * 32 * 2]);
- LOCAL_ALIGNED(32, int16_t, subcoef1, [32 * 32 * 2]);
+ LOCAL_ALIGNED_32(uint8_t, dst, [32 * 32 * 2]);
+ LOCAL_ALIGNED_32(uint8_t, dst0, [32 * 32 * 2]);
+ LOCAL_ALIGNED_32(uint8_t, dst1, [32 * 32 * 2]);
+ LOCAL_ALIGNED_32(int16_t, coef, [32 * 32 * 2]);
+ LOCAL_ALIGNED_32(int16_t, subcoef0, [32 * 32 * 2]);
+ LOCAL_ALIGNED_32(int16_t, subcoef1, [32 * 32 * 2]);
declare_func(void, uint8_t *dst, ptrdiff_t stride, int16_t *block, int eob);
VP9DSPContext dsp;
int y, x, tx, txtp, sub;