Commit 1241eb88 authored by Mickaël Raulet's avatar Mickaël Raulet Committed by Michael Niedermayer

hevc: simplify SAO computation, delay from one row its computation

(cherry picked from commit f2c5f647cec786df26f442a85e6d685a131a50c9)
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent d5953615
......@@ -2092,7 +2092,7 @@ static int hls_decode_entry(AVCodecContext *avctxt, void *isFilterThread)
if (x_ctb + ctb_size >= s->sps->width &&
y_ctb + ctb_size >= s->sps->height)
ff_hevc_hls_filter(s, x_ctb, y_ctb);
ff_hevc_hls_filter(s, x_ctb, y_ctb, ctb_size);
return ctb_addr_ts;
}
......@@ -2167,7 +2167,7 @@ static int hls_decode_entry_wpp(AVCodecContext *avctxt, void *input_ctb_row, int
}
if ((x_ctb+ctb_size) >= s->sps->width && (y_ctb+ctb_size) >= s->sps->height ) {
ff_hevc_hls_filter(s, x_ctb, y_ctb);
ff_hevc_hls_filter(s, x_ctb, y_ctb, ctb_size);
ff_thread_report_progress2(s->avctx, ctb_row , thread, SHIFT_CTB_WPP);
return ctb_addr_ts;
}
......
......@@ -1001,7 +1001,7 @@ void ff_hevc_deblocking_boundary_strengths(HEVCContext *s, int x0, int y0,
int log2_trafo_size);
int ff_hevc_cu_qp_delta_sign_flag(HEVCContext *s);
int ff_hevc_cu_qp_delta_abs(HEVCContext *s);
void ff_hevc_hls_filter(HEVCContext *s, int x, int y);
void ff_hevc_hls_filter(HEVCContext *s, int x, int y, int ctb_size);
void ff_hevc_hls_filters(HEVCContext *s, int x_ctb, int y_ctb, int ctb_size);
void ff_hevc_hls_residual_coding(HEVCContext *s, int x0, int y0,
int log2_trafo_size, enum ScanType scan_idx,
......
This diff is collapsed.
......@@ -207,15 +207,9 @@ void ff_hevc_dsp_init(HEVCDSPContext *hevcdsp, int bit_depth)
hevcdsp->transform_dc_add[2] = FUNC(transform_16x16_dc_add, depth); \
hevcdsp->transform_dc_add[3] = FUNC(transform_32x32_dc_add, depth); \
\
hevcdsp->sao_band_filter[0] = FUNC(sao_band_filter_0, depth); \
hevcdsp->sao_band_filter[1] = FUNC(sao_band_filter_1, depth); \
hevcdsp->sao_band_filter[2] = FUNC(sao_band_filter_2, depth); \
hevcdsp->sao_band_filter[3] = FUNC(sao_band_filter_3, depth); \
\
hevcdsp->sao_edge_filter[0] = FUNC(sao_edge_filter_0, depth); \
hevcdsp->sao_edge_filter[1] = FUNC(sao_edge_filter_1, depth); \
hevcdsp->sao_edge_filter[2] = FUNC(sao_edge_filter_2, depth); \
hevcdsp->sao_edge_filter[3] = FUNC(sao_edge_filter_3, depth); \
hevcdsp->sao_band_filter = FUNC(sao_band_filter_0, depth); \
hevcdsp->sao_edge_filter[0] = FUNC(sao_edge_filter_0, depth); \
hevcdsp->sao_edge_filter[1] = FUNC(sao_edge_filter_1, depth); \
\
QPEL_FUNCS(depth); \
QPEL_UNI_FUNCS(depth); \
......
......@@ -54,13 +54,14 @@ typedef struct HEVCDSPContext {
void (*transform_dc_add[4])(uint8_t *dst, int16_t *coeffs, ptrdiff_t stride);
void (*sao_band_filter[4])(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
struct SAOParams *sao, int *borders,
int width, int height, int c_idx);
void (*sao_edge_filter[4])(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
struct SAOParams *sao, int *borders, int width,
int height, int c_idx, uint8_t vert_edge,
uint8_t horiz_edge, uint8_t diag_edge);
void (*sao_band_filter)(uint8_t *_dst, uint8_t *_src, ptrdiff_t _stride,
struct SAOParams *sao, int *borders,
int width, int height, int c_idx);
void (*sao_edge_filter[2])(uint8_t *_dst, uint8_t *_src, ptrdiff_t _stride,
struct SAOParams *sao, int *borders, int _width,
int _height, int c_idx, uint8_t *vert_edge,
uint8_t *horiz_edge, uint8_t *diag_edge);
void (*put_hevc_qpel[10][2][2])(int16_t *dst, ptrdiff_t dststride, uint8_t *src, ptrdiff_t srcstride,
int height, intptr_t mx, intptr_t my, int width);
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment