You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
hevcdsp: remove compilation-time-fixed parameter from sao_edge_filter
The stride_src parameter is always 2 * MAX_PB_SIZE + FF_INPUT_BUFFER_PADDING_SIZE. Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
@@ -427,9 +427,8 @@ 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,
|
s->hevcdsp.sao_edge_filter(src, dst, stride_src, sao->offset_val[c_idx],
|
||||||
sao->offset_val[c_idx], sao->eo_class[c_idx],
|
sao->eo_class[c_idx], width, height);
|
||||||
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,
|
||||||
|
@@ -61,9 +61,9 @@ typedef struct HEVCDSPContext {
|
|||||||
void (*sao_band_filter[5])(uint8_t *_dst, uint8_t *_src, ptrdiff_t _stride_dst, ptrdiff_t _stride_src,
|
void (*sao_band_filter[5])(uint8_t *_dst, uint8_t *_src, ptrdiff_t _stride_dst, ptrdiff_t _stride_src,
|
||||||
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,
|
/* implicit stride_src parameter has value of 2 * MAX_PB_SIZE + FF_INPUT_BUFFER_PADDING_SIZE */
|
||||||
ptrdiff_t stride_src, int16_t *sao_offset_val, int sao_eo_class,
|
void (*sao_edge_filter)(uint8_t *_dst, uint8_t *_src, ptrdiff_t stride_dst, int16_t *sao_offset_val,
|
||||||
int width, int height);
|
int sao_eo_class, 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,
|
||||||
|
@@ -327,8 +327,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) ? 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, int16_t *sao_offset_val,
|
||||||
ptrdiff_t stride_dst, ptrdiff_t stride_src, int16_t *sao_offset_val,
|
|
||||||
int eo, int width, int height) {
|
int eo, int width, int height) {
|
||||||
|
|
||||||
static const uint8_t edge_idx[] = { 1, 2, 0, 3, 4 };
|
static const uint8_t edge_idx[] = { 1, 2, 0, 3, 4 };
|
||||||
@@ -342,7 +341,7 @@ static void FUNC(sao_edge_filter)(uint8_t *_dst, uint8_t *_src,
|
|||||||
pixel *src = (pixel *)_src;
|
pixel *src = (pixel *)_src;
|
||||||
int a_stride, b_stride;
|
int a_stride, b_stride;
|
||||||
int x, y;
|
int x, y;
|
||||||
stride_src /= sizeof(pixel);
|
ptrdiff_t stride_src = (2*MAX_PB_SIZE + FF_INPUT_BUFFER_PADDING_SIZE) / sizeof(pixel);
|
||||||
stride_dst /= sizeof(pixel);
|
stride_dst /= sizeof(pixel);
|
||||||
|
|
||||||
a_stride = pos[eo][0][0] + pos[eo][0][1] * stride_src;
|
a_stride = pos[eo][0][0] + pos[eo][0][1] * stride_src;
|
||||||
|
Reference in New Issue
Block a user