summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAurelien Jacobs <aurel@gnuage.org>2007-07-24 08:54:56 +0000
committerAurelien Jacobs <aurel@gnuage.org>2007-07-24 08:54:56 +0000
commit73f51a4d3e3934c78006e3c9bf644713c367b40c (patch)
tree9314825a30f0d67f5e0bff0c2df2be3f1c41db08
parent4611b64ec1d90d43a5b64c572ad58b5b7367b033 (diff)
help some gcc version to optimize out those functions
Originally committed as revision 9785 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/dsputil.c4
-rw-r--r--libavcodec/i386/dsputil_mmx.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c
index 41fef24df1..a03c08312e 100644
--- a/libavcodec/dsputil.c
+++ b/libavcodec/dsputil.c
@@ -2641,6 +2641,7 @@ static void put_mspel8_mc22_c(uint8_t *dst, uint8_t *src, int stride){
}
static void h263_v_loop_filter_c(uint8_t *src, int stride, int qscale){
+ if(ENABLE_ANY_H263) {
int x;
const int strength= ff_h263_loop_filter_strength[qscale];
@@ -2673,9 +2674,11 @@ static void h263_v_loop_filter_c(uint8_t *src, int stride, int qscale){
src[x-2*stride] = p0 - d2;
src[x+ stride] = p3 + d2;
}
+ }
}
static void h263_h_loop_filter_c(uint8_t *src, int stride, int qscale){
+ if(ENABLE_ANY_H263) {
int y;
const int strength= ff_h263_loop_filter_strength[qscale];
@@ -2708,6 +2711,7 @@ static void h263_h_loop_filter_c(uint8_t *src, int stride, int qscale){
src[y*stride-2] = p0 - d2;
src[y*stride+1] = p3 + d2;
}
+ }
}
static void h261_loop_filter_c(uint8_t *src, int stride){
diff --git a/libavcodec/i386/dsputil_mmx.c b/libavcodec/i386/dsputil_mmx.c
index b7e657d4a3..64431b200e 100644
--- a/libavcodec/i386/dsputil_mmx.c
+++ b/libavcodec/i386/dsputil_mmx.c
@@ -622,6 +622,7 @@ static void add_bytes_mmx(uint8_t *dst, uint8_t *src, int w){
"paddb %%mm1, %%mm6 \n\t"
static void h263_v_loop_filter_mmx(uint8_t *src, int stride, int qscale){
+ if(ENABLE_ANY_H263) {
const int strength= ff_h263_loop_filter_strength[qscale];
asm volatile(
@@ -638,6 +639,7 @@ static void h263_v_loop_filter_mmx(uint8_t *src, int stride, int qscale){
"+m" (*(uint64_t*)(src + 1*stride))
: "g" (2*strength), "m"(ff_pb_FC)
);
+ }
}
static inline void transpose4x4(uint8_t *dst, uint8_t *src, int dst_stride, int src_stride){
@@ -670,6 +672,7 @@ static inline void transpose4x4(uint8_t *dst, uint8_t *src, int dst_stride, int
}
static void h263_h_loop_filter_mmx(uint8_t *src, int stride, int qscale){
+ if(ENABLE_ANY_H263) {
const int strength= ff_h263_loop_filter_strength[qscale];
uint64_t temp[4] __attribute__ ((aligned(8)));
uint8_t *btemp= (uint8_t*)temp;
@@ -718,6 +721,7 @@ static void h263_h_loop_filter_mmx(uint8_t *src, int stride, int qscale){
"r" ((long) stride ),
"r" ((long)(3*stride))
);
+ }
}
#ifdef CONFIG_ENCODERS