[FFmpeg-cvslog] hevcdsp: replace the SAOParams struct parameter from sao_band_filter
James Almer
git at videolan.org
Sun Feb 1 19:46:30 CET 2015
ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Tue Jan 27 16:46:57 2015 -0300| [2929e560061312e564a33aed4727283cbb48b102] | committer: James Almer
hevcdsp: replace the SAOParams struct parameter from sao_band_filter
Pass instead the two variables from the struct needed in the function.
This simplifies writing asm optimized versions of the function
Signed-off-by: James Almer <jamrial at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2929e560061312e564a33aed4727283cbb48b102
---
libavcodec/hevc_filter.c | 3 ++-
libavcodec/hevcdsp.h | 2 +-
libavcodec/hevcdsp_template.c | 7 +++----
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/libavcodec/hevc_filter.c b/libavcodec/hevc_filter.c
index 30ade74..fb1aa37 100644
--- a/libavcodec/hevc_filter.c
+++ b/libavcodec/hevc_filter.c
@@ -259,7 +259,8 @@ static void sao_filter_CTB(HEVCContext *s, int x, int y)
case SAO_BAND:
copy_CTB(dst, src, width << s->sps->pixel_shift, height, stride_dst, stride_src);
s->hevcdsp.sao_band_filter(src, dst, stride_src, stride_dst,
- sao, width, height, c_idx);
+ sao->offset_val[c_idx], sao->band_position[c_idx],
+ width, height);
restore_tqb_pixels(s, x, y, width, height, c_idx);
sao->type_idx[c_idx] = SAO_APPLIED;
break;
diff --git a/libavcodec/hevcdsp.h b/libavcodec/hevcdsp.h
index 353677a..a798fb1 100644
--- a/libavcodec/hevcdsp.h
+++ b/libavcodec/hevcdsp.h
@@ -59,7 +59,7 @@ typedef struct HEVCDSPContext {
void (*idct_dc[4])(int16_t *coeffs);
void (*sao_band_filter)(uint8_t *_dst, uint8_t *_src, ptrdiff_t _stride_dst, ptrdiff_t _stride_src,
- struct SAOParams *sao, int width, int height, int c_idx);
+ int16_t *sao_offset_val, int sao_left_class, int width, int height);
void (*sao_edge_filter[2])(uint8_t *_dst, uint8_t *_src, ptrdiff_t _stride_dst, ptrdiff_t _stride_src,
struct SAOParams *sao, int *borders, int _width,
diff --git a/libavcodec/hevcdsp_template.c b/libavcodec/hevcdsp_template.c
index a8fff45..23fdb10 100644
--- a/libavcodec/hevcdsp_template.c
+++ b/libavcodec/hevcdsp_template.c
@@ -302,16 +302,15 @@ IDCT_DC(32)
#undef ADD_AND_SCALE
static void FUNC(sao_band_filter_0)(uint8_t *_dst, uint8_t *_src,
- ptrdiff_t stride_dst, ptrdiff_t stride_src, SAOParams *sao,
- int width, int height, int c_idx)
+ ptrdiff_t stride_dst, ptrdiff_t stride_src,
+ int16_t *sao_offset_val, int sao_left_class,
+ int width, int height)
{
pixel *dst = (pixel *)_dst;
pixel *src = (pixel *)_src;
int offset_table[32] = { 0 };
int k, y, x;
int shift = BIT_DEPTH - 5;
- int16_t *sao_offset_val = sao->offset_val[c_idx];
- int sao_left_class = sao->band_position[c_idx];
stride_dst /= sizeof(pixel);
stride_src /= sizeof(pixel);
More information about the ffmpeg-cvslog
mailing list