[FFmpeg-devel] [PATCH 3/6] hevcdsp: further simplify sao_edge_filter

2015-02-03 Thread James Almer
Signed-off-by: James Almer jamr...@gmail.com
---
 libavcodec/hevcdsp_template.c | 12 +---
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/libavcodec/hevcdsp_template.c b/libavcodec/hevcdsp_template.c
index d372c9a..4479435 100644
--- a/libavcodec/hevcdsp_template.c
+++ b/libavcodec/hevcdsp_template.c
@@ -344,8 +344,6 @@ static void FUNC(sao_edge_filter)(uint8_t *_dst, uint8_t 
*_src,
 pixel *dst = (pixel *)_dst;
 pixel *src = (pixel *)_src;
 int a_stride, b_stride;
-int src_offset = 0;
-int dst_offset = 0;
 int x, y;
 stride_src /= sizeof(pixel);
 stride_dst /= sizeof(pixel);
@@ -354,13 +352,13 @@ static void FUNC(sao_edge_filter)(uint8_t *_dst, uint8_t 
*_src,
 b_stride = pos[eo][1][0] + pos[eo][1][1] * stride_src;
 for (y = 0; y  height; y++) {
 for (x = 0; x  width; x++) {
-int diff0 = CMP(src[x + src_offset], src[x + src_offset + 
a_stride]);
-int diff1 = CMP(src[x + src_offset], src[x + src_offset + 
b_stride]);
+int diff0 = CMP(src[x], src[x + a_stride]);
+int diff1 = CMP(src[x], src[x + b_stride]);
 int offset_val= edge_idx[2 + diff0 + diff1];
-dst[x + dst_offset] = av_clip_pixel(src[x + src_offset] + 
sao_offset_val[offset_val]);
+dst[x] = av_clip_pixel(src[x] + sao_offset_val[offset_val]);
 }
-src_offset += stride_src;
-dst_offset += stride_dst;
+src += stride_src;
+dst += stride_dst;
 }
 }
 
-- 
2.2.2

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 3/6] hevcdsp: further simplify sao_edge_filter

2015-02-03 Thread Christophe Gisquet
Hi,

2015-02-04 4:55 GMT+01:00 James Almer jamr...@gmail.com:
[...]

Ok, no need to resend a refreshed patch if patch 2/6 changes.

-- 
Christophe
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 3/6] hevcdsp: further simplify sao_edge_filter

2015-02-03 Thread Mickaƫl Raulet
ok.

2015-02-04 8:07 GMT+01:00 Christophe Gisquet christophe.gisq...@gmail.com:

 Hi,

 2015-02-04 4:55 GMT+01:00 James Almer jamr...@gmail.com:
 [...]

 Ok, no need to resend a refreshed patch if patch 2/6 changes.

 --
 Christophe
 ___
 ffmpeg-devel mailing list
 ffmpeg-devel@ffmpeg.org
 http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel