mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
hevcdsp: replace the SAOParams struct parameter from sao_edge_filter
As with sao_band_filter, pass instead the two variables from the struct needed in the function. This simplifies writing asm optimized versions. Reviewed-by: Mickaël Raulet <mraulet@insa-rennes.fr> Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
121ccc3365
commit
7457afc64d
@ -427,7 +427,9 @@ static void sao_filter_CTB(HEVCContext *s, int x, int y)
|
|||||||
|
|
||||||
copy_CTB_to_hv(s, src, stride_src, x0, y0, width, height, c_idx,
|
copy_CTB_to_hv(s, src, stride_src, x0, y0, width, height, c_idx,
|
||||||
x_ctb, y_ctb);
|
x_ctb, y_ctb);
|
||||||
s->hevcdsp.sao_edge_filter(src, dst, stride_src, stride_dst, sao, width, height, c_idx);
|
s->hevcdsp.sao_edge_filter(src, dst, stride_src, stride_dst,
|
||||||
|
sao->offset_val[c_idx], sao->eo_class[c_idx],
|
||||||
|
width, height);
|
||||||
s->hevcdsp.sao_edge_restore[restore](src, dst,
|
s->hevcdsp.sao_edge_restore[restore](src, dst,
|
||||||
stride_src, stride_dst,
|
stride_src, stride_dst,
|
||||||
sao,
|
sao,
|
||||||
|
@ -62,8 +62,8 @@ typedef struct HEVCDSPContext {
|
|||||||
int16_t *sao_offset_val, int sao_left_class, int width, int height);
|
int16_t *sao_offset_val, int sao_left_class, int width, int height);
|
||||||
|
|
||||||
void (*sao_edge_filter)(uint8_t *_dst, uint8_t *_src, ptrdiff_t stride_dst,
|
void (*sao_edge_filter)(uint8_t *_dst, uint8_t *_src, ptrdiff_t stride_dst,
|
||||||
ptrdiff_t stride_src, SAOParams *sao, int width,
|
ptrdiff_t stride_src, int16_t *sao_offset_val, int sao_eo_class,
|
||||||
int height, int c_idx);
|
int width, int height);
|
||||||
|
|
||||||
void (*sao_edge_restore[2])(uint8_t *_dst, uint8_t *_src, ptrdiff_t _stride_dst, ptrdiff_t _stride_src,
|
void (*sao_edge_restore[2])(uint8_t *_dst, uint8_t *_src, ptrdiff_t _stride_dst, ptrdiff_t _stride_src,
|
||||||
struct SAOParams *sao, int *borders, int _width, int _height, int c_idx,
|
struct SAOParams *sao, int *borders, int _width, int _height, int c_idx,
|
||||||
|
@ -328,9 +328,8 @@ 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) ? 1 : ((a) == (b) ? 0 : -1))
|
||||||
|
|
||||||
static void FUNC(sao_edge_filter)(uint8_t *_dst, uint8_t *_src,
|
static void FUNC(sao_edge_filter)(uint8_t *_dst, uint8_t *_src,
|
||||||
ptrdiff_t stride_dst, ptrdiff_t stride_src, SAOParams *sao,
|
ptrdiff_t stride_dst, ptrdiff_t stride_src, int16_t *sao_offset_val,
|
||||||
int width, int height,
|
int eo, int width, int height) {
|
||||||
int c_idx) {
|
|
||||||
|
|
||||||
static const uint8_t edge_idx[] = { 1, 2, 0, 3, 4 };
|
static const uint8_t edge_idx[] = { 1, 2, 0, 3, 4 };
|
||||||
static const int8_t pos[4][2][2] = {
|
static const int8_t pos[4][2][2] = {
|
||||||
@ -339,8 +338,6 @@ static void FUNC(sao_edge_filter)(uint8_t *_dst, uint8_t *_src,
|
|||||||
{ { -1, -1 }, { 1, 1 } }, // 45 degree
|
{ { -1, -1 }, { 1, 1 } }, // 45 degree
|
||||||
{ { 1, -1 }, { -1, 1 } }, // 135 degree
|
{ { 1, -1 }, { -1, 1 } }, // 135 degree
|
||||||
};
|
};
|
||||||
int16_t *sao_offset_val = sao->offset_val[c_idx];
|
|
||||||
int eo = sao->eo_class[c_idx];
|
|
||||||
pixel *dst = (pixel *)_dst;
|
pixel *dst = (pixel *)_dst;
|
||||||
pixel *src = (pixel *)_src;
|
pixel *src = (pixel *)_src;
|
||||||
int a_stride, b_stride;
|
int a_stride, b_stride;
|
||||||
|
Loading…
Reference in New Issue
Block a user