aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-01-23 17:44:56 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-01-23 17:44:56 +0100
commitac8987591f5503768e7587c25693928f26fcb3d1 (patch)
tree2531b37d6673aea7f4d1c61549978664a2c807ac /libavfilter
parenta793a587df05bfc789e040c13329825cf9a261a3 (diff)
parent88bd7fdc821aaa0cbcf44cf075c62aaa42121e3f (diff)
downloadffmpeg-ac8987591f5503768e7587c25693928f26fcb3d1.tar.gz
Merge commit '88bd7fdc821aaa0cbcf44cf075c62aaa42121e3f'
* commit '88bd7fdc821aaa0cbcf44cf075c62aaa42121e3f': Drop DCTELEM typedef Conflicts: libavcodec/alpha/dsputil_alpha.h libavcodec/alpha/motion_est_alpha.c libavcodec/arm/dsputil_init_armv6.c libavcodec/bfin/dsputil_bfin.h libavcodec/bfin/pixels_bfin.S libavcodec/cavs.c libavcodec/cavsdec.c libavcodec/dct-test.c libavcodec/dnxhdenc.c libavcodec/dsputil.c libavcodec/dsputil.h libavcodec/dsputil_template.c libavcodec/eamad.c libavcodec/h264_cavlc.c libavcodec/h264idct_template.c libavcodec/mpeg12.c libavcodec/mpegvideo.c libavcodec/mpegvideo.h libavcodec/mpegvideo_enc.c libavcodec/ppc/dsputil_altivec.c libavcodec/proresdsp.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/libmpcodecs/vf_fspp.c42
-rw-r--r--libavfilter/libmpcodecs/vf_pp7.c28
-rw-r--r--libavfilter/libmpcodecs/vf_spp.c20
-rw-r--r--libavfilter/vf_decimate.c2
4 files changed, 46 insertions, 46 deletions
diff --git a/libavfilter/libmpcodecs/vf_fspp.c b/libavfilter/libmpcodecs/vf_fspp.c
index 6f806b21c7..6090c9aeab 100644
--- a/libavfilter/libmpcodecs/vf_fspp.c
+++ b/libavfilter/libmpcodecs/vf_fspp.c
@@ -164,10 +164,10 @@ static void mul_thrmat_c(struct vf_priv_s *p,int q)
((short*)p->threshold_mtx)[a]=q * ((short*)p->threshold_mtx_noq)[a];//ints faster in C
}
-static void column_fidct_c(int16_t* thr_adr, DCTELEM *data, DCTELEM *output, int cnt);
-static void row_idct_c(DCTELEM* workspace,
+static void column_fidct_c(int16_t* thr_adr, int16_t *data, int16_t *output, int cnt);
+static void row_idct_c(int16_t* workspace,
int16_t* output_adr, int output_stride, int cnt);
-static void row_fdct_c(DCTELEM *data, const uint8_t *pixels, int line_size, int cnt);
+static void row_fdct_c(int16_t *data, const uint8_t *pixels, int line_size, int cnt);
//this is rather ugly, but there is no need for function pointers
#define store_slice_s store_slice_c
@@ -393,10 +393,10 @@ static void mul_thrmat_mmx(struct vf_priv_s *p, int q)
);
}
-static void column_fidct_mmx(int16_t* thr_adr, DCTELEM *data, DCTELEM *output, int cnt);
-static void row_idct_mmx(DCTELEM* workspace,
+static void column_fidct_mmx(int16_t* thr_adr, int16_t *data, int16_t *output, int cnt);
+static void row_idct_mmx(int16_t* workspace,
int16_t* output_adr, int output_stride, int cnt);
-static void row_fdct_mmx(DCTELEM *data, const uint8_t *pixels, int line_size, int cnt);
+static void row_fdct_mmx(int16_t *data, const uint8_t *pixels, int line_size, int cnt);
#define store_slice_s store_slice_mmx
#define store_slice2_s store_slice2_mmx
@@ -416,8 +416,8 @@ static void filter(struct vf_priv_s *p, uint8_t *dst, uint8_t *src,
const int step=6-p->log2_count;
const int qps= 3 + is_luma;
int32_t __attribute__((aligned(32))) block_align[4*8*BLOCKSZ+ 4*8*BLOCKSZ];
- DCTELEM *block= (DCTELEM *)block_align;
- DCTELEM *block3=(DCTELEM *)(block_align+4*8*BLOCKSZ);
+ int16_t *block= (int16_t *)block_align;
+ int16_t *block3=(int16_t *)(block_align+4*8*BLOCKSZ);
memset(block3, 0, 4*8*BLOCKSZ);
@@ -460,8 +460,8 @@ static void filter(struct vf_priv_s *p, uint8_t *dst, uint8_t *src,
column_fidct_s((int16_t*)(&p->threshold_mtx[0]), block+x*8, block3+x*8, 8); //yes, this is a HOTSPOT
}
row_idct_s(block3+0*8, p->temp + (y&15)*stride+x0+2-(y&1), stride, 2*(BLOCKSZ-1));
- memmove(block, block+(BLOCKSZ-1)*64, 8*8*sizeof(DCTELEM)); //cycling
- memmove(block3, block3+(BLOCKSZ-1)*64, 6*8*sizeof(DCTELEM));
+ memmove(block, block+(BLOCKSZ-1)*64, 8*8*sizeof(int16_t)); //cycling
+ memmove(block3, block3+(BLOCKSZ-1)*64, 6*8*sizeof(int16_t));
}
//
es=width+8-x0; // 8, ...
@@ -694,7 +694,7 @@ const vf_info_t ff_vf_info_fspp = {
//#define MANGLE(a) #a
-//typedef int16_t DCTELEM; //! only int16_t
+//typedef int16_t int16_t; //! only int16_t
#define DCTSIZE 8
#define DCTSIZE_S "8"
@@ -745,15 +745,15 @@ static const int16_t FIX_1_082392200=FIX(1.082392200, 13);
#if !HAVE_MMX
-static void column_fidct_c(int16_t* thr_adr, DCTELEM *data, DCTELEM *output, int cnt)
+static void column_fidct_c(int16_t* thr_adr, int16_t *data, int16_t *output, int cnt)
{
int_simd16_t tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
int_simd16_t tmp10, tmp11, tmp12, tmp13;
int_simd16_t z1,z2,z3,z4,z5, z10, z11, z12, z13;
int_simd16_t d0, d1, d2, d3, d4, d5, d6, d7;
- DCTELEM* dataptr;
- DCTELEM* wsptr;
+ int16_t* dataptr;
+ int16_t* wsptr;
int16_t *threshold;
int ctr;
@@ -870,7 +870,7 @@ static void column_fidct_c(int16_t* thr_adr, DCTELEM *data, DCTELEM *output, int
#else /* HAVE_MMX */
-static void column_fidct_mmx(int16_t* thr_adr, DCTELEM *data, DCTELEM *output, int cnt)
+static void column_fidct_mmx(int16_t* thr_adr, int16_t *data, int16_t *output, int cnt)
{
uint64_t __attribute__((aligned(8))) temps[4];
__asm__ volatile(
@@ -1605,14 +1605,14 @@ static void column_fidct_mmx(int16_t* thr_adr, DCTELEM *data, DCTELEM *output,
#if !HAVE_MMX
-static void row_idct_c(DCTELEM* workspace,
+static void row_idct_c(int16_t* workspace,
int16_t* output_adr, int output_stride, int cnt)
{
int_simd16_t tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
int_simd16_t tmp10, tmp11, tmp12, tmp13;
int_simd16_t z5, z10, z11, z12, z13;
int16_t* outptr;
- DCTELEM* wsptr;
+ int16_t* wsptr;
cnt*=4;
wsptr = workspace;
@@ -1670,7 +1670,7 @@ static void row_idct_c(DCTELEM* workspace,
#else /* HAVE_MMX */
-static void row_idct_mmx (DCTELEM* workspace,
+static void row_idct_mmx (int16_t* workspace,
int16_t* output_adr, int output_stride, int cnt)
{
uint64_t __attribute__((aligned(8))) temps[4];
@@ -1874,12 +1874,12 @@ static void row_idct_mmx (DCTELEM* workspace,
#if !HAVE_MMX
-static void row_fdct_c(DCTELEM *data, const uint8_t *pixels, int line_size, int cnt)
+static void row_fdct_c(int16_t *data, const uint8_t *pixels, int line_size, int cnt)
{
int_simd16_t tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
int_simd16_t tmp10, tmp11, tmp12, tmp13;
int_simd16_t z1, z2, z3, z4, z5, z11, z13;
- DCTELEM *dataptr;
+ int16_t *dataptr;
cnt*=4;
// Pass 1: process rows.
@@ -1937,7 +1937,7 @@ static void row_fdct_c(DCTELEM *data, const uint8_t *pixels, int line_size, int
#else /* HAVE_MMX */
-static void row_fdct_mmx(DCTELEM *data, const uint8_t *pixels, int line_size, int cnt)
+static void row_fdct_mmx(int16_t *data, const uint8_t *pixels, int line_size, int cnt)
{
uint64_t __attribute__((aligned(8))) temps[4];
__asm__ volatile(
diff --git a/libavfilter/libmpcodecs/vf_pp7.c b/libavfilter/libmpcodecs/vf_pp7.c
index 7f0e39d6ff..14bd863525 100644
--- a/libavfilter/libmpcodecs/vf_pp7.c
+++ b/libavfilter/libmpcodecs/vf_pp7.c
@@ -44,7 +44,7 @@
#define XMIN(a,b) ((a) < (b) ? (a) : (b))
#define XMAX(a,b) ((a) > (b) ? (a) : (b))
-typedef short DCTELEM;
+typedef short int16_t;
//===========================================================================//
static const uint8_t __attribute__((aligned(8))) dither[8][8]={
@@ -66,7 +66,7 @@ struct vf_priv_s {
uint8_t *src;
};
#if 0
-static inline void dct7_c(DCTELEM *dst, int s0, int s1, int s2, int s3, int step){
+static inline void dct7_c(int16_t *dst, int s0, int s1, int s2, int s3, int step){
int s, d;
int dst2[64];
//#define S0 (1024/0.37796447300922719759)
@@ -113,7 +113,7 @@ static inline void dct7_c(DCTELEM *dst, int s0, int s1, int s2, int s3, int step
}
#endif
-static inline void dctA_c(DCTELEM *dst, uint8_t *src, int stride){
+static inline void dctA_c(int16_t *dst, uint8_t *src, int stride){
int i;
for(i=0; i<4; i++){
@@ -135,7 +135,7 @@ static inline void dctA_c(DCTELEM *dst, uint8_t *src, int stride){
}
}
-static void dctB_c(DCTELEM *dst, DCTELEM *src){
+static void dctB_c(int16_t *dst, int16_t *src){
int i;
for(i=0; i<4; i++){
@@ -158,7 +158,7 @@ static void dctB_c(DCTELEM *dst, DCTELEM *src){
}
#if HAVE_MMX
-static void dctB_mmx(DCTELEM *dst, DCTELEM *src){
+static void dctB_mmx(int16_t *dst, int16_t *src){
__asm__ volatile (
"movq (%0), %%mm0 \n\t"
"movq 1*4*2(%0), %%mm1 \n\t"
@@ -191,7 +191,7 @@ static void dctB_mmx(DCTELEM *dst, DCTELEM *src){
}
#endif
-static void (*dctB)(DCTELEM *dst, DCTELEM *src)= dctB_c;
+static void (*dctB)(int16_t *dst, int16_t *src)= dctB_c;
#define N0 4
#define N1 5
@@ -228,7 +228,7 @@ static void init_thres2(void){
}
}
-static int hardthresh_c(DCTELEM *src, int qp){
+static int hardthresh_c(int16_t *src, int qp){
int i;
int a;
@@ -244,7 +244,7 @@ static int hardthresh_c(DCTELEM *src, int qp){
return (a + (1<<11))>>12;
}
-static int mediumthresh_c(DCTELEM *src, int qp){
+static int mediumthresh_c(int16_t *src, int qp){
int i;
int a;
@@ -265,7 +265,7 @@ static int mediumthresh_c(DCTELEM *src, int qp){
return (a + (1<<11))>>12;
}
-static int softthresh_c(DCTELEM *src, int qp){
+static int softthresh_c(int16_t *src, int qp){
int i;
int a;
@@ -282,14 +282,14 @@ static int softthresh_c(DCTELEM *src, int qp){
return (a + (1<<11))>>12;
}
-static int (*requantize)(DCTELEM *src, int qp)= hardthresh_c;
+static int (*requantize)(int16_t *src, int qp)= hardthresh_c;
static void filter(struct vf_priv_s *p, uint8_t *dst, uint8_t *src, int dst_stride, int src_stride, int width, int height, uint8_t *qp_store, int qp_stride, int is_luma){
int x, y;
const int stride= is_luma ? p->temp_stride : ((width+16+15)&(~15));
uint8_t *p_src= p->src + 8*stride;
- DCTELEM *block= (DCTELEM *)p->src;
- DCTELEM *temp= (DCTELEM *)(p->src + 32);
+ int16_t *block= (int16_t *)p->src;
+ int16_t *temp= (int16_t *)(p->src + 32);
if (!src || !dst) return; // HACK avoid crash for Y8 colourspace
for(y=0; y<height; y++){
@@ -310,7 +310,7 @@ static void filter(struct vf_priv_s *p, uint8_t *dst, uint8_t *src, int dst_stri
for(x=-8; x<0; x+=4){
const int index= x + y*stride + (8-3)*(1+stride) + 8; //FIXME silly offset
uint8_t *src = p_src + index;
- DCTELEM *tp= temp+4*x;
+ int16_t *tp= temp+4*x;
dctA_c(tp+4*8, src, stride);
}
@@ -328,7 +328,7 @@ static void filter(struct vf_priv_s *p, uint8_t *dst, uint8_t *src, int dst_stri
for(; x<end; x++){
const int index= x + y*stride + (8-3)*(1+stride) + 8; //FIXME silly offset
uint8_t *src = p_src + index;
- DCTELEM *tp= temp+4*x;
+ int16_t *tp= temp+4*x;
int v;
if((x&3)==0)
diff --git a/libavfilter/libmpcodecs/vf_spp.c b/libavfilter/libmpcodecs/vf_spp.c
index b53b57edc9..f821374e06 100644
--- a/libavfilter/libmpcodecs/vf_spp.c
+++ b/libavfilter/libmpcodecs/vf_spp.c
@@ -105,7 +105,7 @@ struct vf_priv_s {
#define SHIFT 22
-static void hardthresh_c(DCTELEM dst[64], DCTELEM src[64], int qp, uint8_t *permutation){
+static void hardthresh_c(int16_t dst[64], int16_t src[64], int qp, uint8_t *permutation){
int i;
int bias= 0; //FIXME
unsigned int threshold1, threshold2;
@@ -113,7 +113,7 @@ static void hardthresh_c(DCTELEM dst[64], DCTELEM src[64], int qp, uint8_t *perm
threshold1= qp*((1<<4) - bias) - 1;
threshold2= (threshold1<<1);
- memset(dst, 0, 64*sizeof(DCTELEM));
+ memset(dst, 0, 64*sizeof(int16_t));
dst[0]= (src[0] + 4)>>3;
for(i=1; i<64; i++){
@@ -125,7 +125,7 @@ static void hardthresh_c(DCTELEM dst[64], DCTELEM src[64], int qp, uint8_t *perm
}
}
-static void softthresh_c(DCTELEM dst[64], DCTELEM src[64], int qp, uint8_t *permutation){
+static void softthresh_c(int16_t dst[64], int16_t src[64], int qp, uint8_t *permutation){
int i;
int bias= 0; //FIXME
unsigned int threshold1, threshold2;
@@ -133,7 +133,7 @@ static void softthresh_c(DCTELEM dst[64], DCTELEM src[64], int qp, uint8_t *perm
threshold1= qp*((1<<4) - bias) - 1;
threshold2= (threshold1<<1);
- memset(dst, 0, 64*sizeof(DCTELEM));
+ memset(dst, 0, 64*sizeof(int16_t));
dst[0]= (src[0] + 4)>>3;
for(i=1; i<64; i++){
@@ -149,7 +149,7 @@ static void softthresh_c(DCTELEM dst[64], DCTELEM src[64], int qp, uint8_t *perm
}
#if HAVE_MMX
-static void hardthresh_mmx(DCTELEM dst[64], DCTELEM src[64], int qp, uint8_t *permutation){
+static void hardthresh_mmx(int16_t dst[64], int16_t src[64], int qp, uint8_t *permutation){
int bias= 0; //FIXME
unsigned int threshold1;
@@ -217,7 +217,7 @@ static void hardthresh_mmx(DCTELEM dst[64], DCTELEM src[64], int qp, uint8_t *pe
dst[0]= (src[0] + 4)>>3;
}
-static void softthresh_mmx(DCTELEM dst[64], DCTELEM src[64], int qp, uint8_t *permutation){
+static void softthresh_mmx(int16_t dst[64], int16_t src[64], int qp, uint8_t *permutation){
int bias= 0; //FIXME
unsigned int threshold1;
@@ -294,7 +294,7 @@ static void softthresh_mmx(DCTELEM dst[64], DCTELEM src[64], int qp, uint8_t *pe
}
#endif
-static inline void add_block(int16_t *dst, int stride, DCTELEM block[64]){
+static inline void add_block(int16_t *dst, int stride, int16_t block[64]){
int y;
for(y=0; y<8; y++){
@@ -372,15 +372,15 @@ static void store_slice_mmx(uint8_t *dst, int16_t *src, int dst_stride, int src_
static void (*store_slice)(uint8_t *dst, int16_t *src, int dst_stride, int src_stride, int width, int height, int log2_scale)= store_slice_c;
-static void (*requantize)(DCTELEM dst[64], DCTELEM src[64], int qp, uint8_t *permutation)= hardthresh_c;
+static void (*requantize)(int16_t dst[64], int16_t src[64], int qp, uint8_t *permutation)= hardthresh_c;
static void filter(struct vf_priv_s *p, uint8_t *dst, uint8_t *src, int dst_stride, int src_stride, int width, int height, uint8_t *qp_store, int qp_stride, int is_luma){
int x, y, i;
const int count= 1<<p->log2_count;
const int stride= is_luma ? p->temp_stride : ((width+16+15)&(~15));
uint64_t __attribute__((aligned(16))) block_align[32];
- DCTELEM *block = (DCTELEM *)block_align;
- DCTELEM *block2= (DCTELEM *)(block_align+16);
+ int16_t *block = (int16_t *)block_align;
+ int16_t *block2= (int16_t *)(block_align+16);
if (!src || !dst) return; // HACK avoid crash for Y8 colourspace
for(y=0; y<height; y++){
diff --git a/libavfilter/vf_decimate.c b/libavfilter/vf_decimate.c
index b81c3ee8f2..0d89b8153f 100644
--- a/libavfilter/vf_decimate.c
+++ b/libavfilter/vf_decimate.c
@@ -63,7 +63,7 @@ static int diff_planes(AVFilterContext *ctx,
int x, y;
int d, c = 0;
int t = (w/16)*(h/16)*decimate->frac;
- DCTELEM block[8*8];
+ int16_t block[8*8];
/* compute difference for blocks of 8x8 bytes */
for (y = 0; y < h-7; y += 4) {