diff libmpcodecs/vf_spp.c @ 35743:68db224c2275

libmpcodec&libvo: avoid use of DCTELEM as it will disappear from ffmpeg. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
author michael
date Wed, 23 Jan 2013 16:43:59 +0000
parents d206960484fe
children 488545e72316
line wrap: on
line diff
--- a/libmpcodecs/vf_spp.c	Wed Jan 23 16:04:33 2013 +0000
+++ b/libmpcodecs/vf_spp.c	Wed Jan 23 16:43:59 2013 +0000
@@ -106,7 +106,7 @@
 
 #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;
@@ -114,7 +114,7 @@
         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++){
@@ -126,7 +126,7 @@
         }
 }
 
-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;
@@ -134,7 +134,7 @@
         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++){
@@ -150,7 +150,7 @@
 }
 
 #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;
 
@@ -218,7 +218,7 @@
         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;
 
@@ -295,7 +295,7 @@
 }
 #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++){
@@ -373,15 +373,15 @@
 
 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++){