diff options
author | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2007-04-03 01:18:24 +0200 |
---|---|---|
committer | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2007-04-03 01:18:24 +0200 |
commit | fb09531720a4aa2dfa97e5a9a246a453b6278fd2 (patch) | |
tree | 61525c3a8ddb419d3838a26e488fc3659079bbcd /contrib/ffmpeg/libpostproc | |
parent | 294d01046724e28b7193bcb65bf2a0391b0135b6 (diff) | |
download | xine-lib-fb09531720a4aa2dfa97e5a9a246a453b6278fd2.tar.gz xine-lib-fb09531720a4aa2dfa97e5a9a246a453b6278fd2.tar.bz2 |
Sync with a more recent version of FFmpeg.
Diffstat (limited to 'contrib/ffmpeg/libpostproc')
-rw-r--r-- | contrib/ffmpeg/libpostproc/Makefile | 2 | ||||
-rw-r--r-- | contrib/ffmpeg/libpostproc/postprocess.c | 2 | ||||
-rw-r--r-- | contrib/ffmpeg/libpostproc/postprocess_altivec_template.c | 13 | ||||
-rw-r--r-- | contrib/ffmpeg/libpostproc/postprocess_template.c | 6 |
4 files changed, 11 insertions, 12 deletions
diff --git a/contrib/ffmpeg/libpostproc/Makefile b/contrib/ffmpeg/libpostproc/Makefile index a6765365d..d30b4a18d 100644 --- a/contrib/ffmpeg/libpostproc/Makefile +++ b/contrib/ffmpeg/libpostproc/Makefile @@ -7,10 +7,8 @@ incdir=$(prefix)/include/postproc EXTRALIBS := -L$(BUILD_ROOT)/libavutil -lavutil$(BUILDSUF) $(EXTRALIBS) NAME=postproc -ifeq ($(BUILD_SHARED),yes) LIBVERSION=$(SPPVERSION) LIBMAJOR=$(SPPMAJOR) -endif STATIC_OBJS=postprocess.o SHARED_OBJS=postprocess_pic.o diff --git a/contrib/ffmpeg/libpostproc/postprocess.c b/contrib/ffmpeg/libpostproc/postprocess.c index c9f2893e3..f68c8a723 100644 --- a/contrib/ffmpeg/libpostproc/postprocess.c +++ b/contrib/ffmpeg/libpostproc/postprocess.c @@ -466,7 +466,7 @@ static inline void horizX1Filter(uint8_t *src, int stride, int QP) /** * accurate deblock filter */ -static always_inline void do_a_deblock_C(uint8_t *src, int step, int stride, PPContext *c){ +static av_always_inline void do_a_deblock_C(uint8_t *src, int step, int stride, PPContext *c){ int y; const int QP= c->QP; const int dcOffset= ((c->nonBQP*c->ppMode.baseDcDiff)>>8) + 1; diff --git a/contrib/ffmpeg/libpostproc/postprocess_altivec_template.c b/contrib/ffmpeg/libpostproc/postprocess_altivec_template.c index 3a33a5885..6a76c0eb7 100644 --- a/contrib/ffmpeg/libpostproc/postprocess_altivec_template.c +++ b/contrib/ffmpeg/libpostproc/postprocess_altivec_template.c @@ -20,6 +20,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "avutil.h" #ifdef CONFIG_DARWIN #define AVV(x...) (x) @@ -67,7 +68,7 @@ static inline int vertClassify_altivec(uint8_t src[], int stride, PPContext *c) vector by assuming (stride % 16) == 0, unfortunately this is not always true. */ - short __attribute__ ((aligned(16))) data[8]; + DECLARE_ALIGNED(16, short, data[8]); int numEq; uint8_t *src2 = src; vector signed short v_dcOffset; @@ -206,7 +207,7 @@ static inline void doVertLowPass_altivec(uint8_t *src, int stride, PPContext *c) const vector signed int zero = vec_splat_s32(0); const int properStride = (stride % 16); const int srcAlign = ((unsigned long)src2 % 16); - short __attribute__ ((aligned(16))) qp[8]; + DECLARE_ALIGNED(16, short, qp[8]); qp[0] = c->QP; vector signed short vqp = vec_ld(0, qp); vqp = vec_splat(vqp, 0); @@ -392,7 +393,7 @@ static inline void doVertDefFilter_altivec(uint8_t src[], int stride, PPContext */ uint8_t *src2 = src; const vector signed int zero = vec_splat_s32(0); - short __attribute__ ((aligned(16))) qp[8]; + DECLARE_ALIGNED(16, short, qp[8]); qp[0] = 8*c->QP; vector signed short vqp = vec_ld(0, qp); vqp = vec_splat(vqp, 0); @@ -515,7 +516,7 @@ static inline void dering_altivec(uint8_t src[], int stride, PPContext *c) { src & stride :-( */ uint8_t *srcCopy = src; - uint8_t __attribute__((aligned(16))) dt[16]; + DECLARE_ALIGNED(16, uint8_t, dt[16]); const vector signed int zero = vec_splat_s32(0); vector unsigned char v_dt; dt[0] = deringThreshold; @@ -579,7 +580,7 @@ static inline void dering_altivec(uint8_t src[], int stride, PPContext *c) { v_avg = vec_avg(v_min, v_max); } - signed int __attribute__((aligned(16))) S[8]; + DECLARE_ALIGNED(16, signed int, S[8]); { const vector unsigned short mask1 = (vector unsigned short) AVV(0x0001, 0x0002, 0x0004, 0x0008, @@ -675,7 +676,7 @@ static inline void dering_altivec(uint8_t src[], int stride, PPContext *c) { /* I'm not sure the following is actually faster than straight, unvectorized C code :-( */ - int __attribute__((aligned(16))) tQP2[4]; + DECLARE_ALIGNED(16, int, tQP2[4]); tQP2[0]= c->QP/2 + 1; vector signed int vQP2 = vec_ld(0, tQP2); vQP2 = vec_splat(vQP2, 0); diff --git a/contrib/ffmpeg/libpostproc/postprocess_template.c b/contrib/ffmpeg/libpostproc/postprocess_template.c index c22d5d1b6..f084130a6 100644 --- a/contrib/ffmpeg/libpostproc/postprocess_template.c +++ b/contrib/ffmpeg/libpostproc/postprocess_template.c @@ -2645,7 +2645,7 @@ Switch between /** * accurate deblock filter */ -static always_inline void RENAME(do_a_deblock)(uint8_t *src, int step, int stride, PPContext *c){ +static av_always_inline void RENAME(do_a_deblock)(uint8_t *src, int step, int stride, PPContext *c){ int64_t dc_mask, eq_mask, both_masks; int64_t sums[10*8*2]; src+= step*3; // src points to begin of the 8x8 Block @@ -3464,7 +3464,7 @@ static void RENAME(postProcess)(uint8_t src[], int srcStride, uint8_t dst[], int uint8_t *srcBlock= &(src[y*srcStride]); uint8_t *dstBlock= tempDst + dstStride; - // From this point on it is guranteed that we can read and write 16 lines downward + // From this point on it is guaranteed that we can read and write 16 lines downward // finish 1 block before the next otherwise we might have a problem // with the L1 Cache of the P4 ... or only a few blocks at a time or soemthing for(x=0; x<width; x+=BLOCK_SIZE) @@ -3578,7 +3578,7 @@ static void RENAME(postProcess)(uint8_t src[], int srcStride, uint8_t dst[], int srcBlock= tempSrc; } - // From this point on it is guranteed that we can read and write 16 lines downward + // From this point on it is guaranteed that we can read and write 16 lines downward // finish 1 block before the next otherwise we might have a problem // with the L1 Cache of the P4 ... or only a few blocks at a time or soemthing for(x=0; x<width; x+=BLOCK_SIZE) |