summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2015-02-16 16:53:31 -0300
committerJames Almer <jamrial@gmail.com>2015-02-16 17:47:47 -0300
commit22596383f3b8c7cd8a06570957face3875a73d3b (patch)
treed67cc94ce0cd0fbf3ec831d54513220efce6bf11 /libavcodec
parent4bf3fab2811509a4f9ca932191e9bfa801ceeae2 (diff)
avcodec/hevcdsp: optimize pixel comparison in sao_edge_filter
GCC 4.9.2 on a Core i5-4200U @ 1.60GHz, Linux x86_64 Before 715487 decicycles in sao_edge_filter_8, 262144 runs, 0 skips After 672104 decicycles in sao_edge_filter_8, 262144 runs, 0 skips Reviewed-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/hevcdsp_template.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/hevcdsp_template.c b/libavcodec/hevcdsp_template.c
index 9ce7bf2630..aeb142ca29 100644
--- a/libavcodec/hevcdsp_template.c
+++ b/libavcodec/hevcdsp_template.c
@@ -325,7 +325,7 @@ static void FUNC(sao_band_filter_0)(uint8_t *_dst, uint8_t *_src,
}
}
-#define CMP(a, b) ((a) > (b) ? 1 : ((a) == (b) ? 0 : -1))
+#define CMP(a, b) ((a > b) - (a < b))
static void FUNC(sao_edge_filter)(uint8_t *_dst, uint8_t *_src, ptrdiff_t stride_dst, int16_t *sao_offset_val,
int eo, int width, int height) {