mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-28 20:53:54 +02:00
lavc/hevcdec: move HEVCContext.cbf_luma to HEVCLayerContext
This commit is contained in:
parent
cf7add8d70
commit
59de042cf6
@ -777,8 +777,8 @@ void ff_hevc_deblocking_boundary_strengths(HEVCLocalContext *lc, const HEVCLayer
|
||||
int x_tu = (x0 + i) >> log2_min_tu_size;
|
||||
const MvField *top = &tab_mvf[yp_pu * min_pu_width + x_pu];
|
||||
const MvField *curr = &tab_mvf[yq_pu * min_pu_width + x_pu];
|
||||
uint8_t top_cbf_luma = s->cbf_luma[yp_tu * min_tu_width + x_tu];
|
||||
uint8_t curr_cbf_luma = s->cbf_luma[yq_tu * min_tu_width + x_tu];
|
||||
uint8_t top_cbf_luma = l->cbf_luma[yp_tu * min_tu_width + x_tu];
|
||||
uint8_t curr_cbf_luma = l->cbf_luma[yq_tu * min_tu_width + x_tu];
|
||||
|
||||
if (curr->pred_flag == PF_INTRA || top->pred_flag == PF_INTRA)
|
||||
bs = 2;
|
||||
@ -815,8 +815,8 @@ void ff_hevc_deblocking_boundary_strengths(HEVCLocalContext *lc, const HEVCLayer
|
||||
int y_tu = (y0 + i) >> log2_min_tu_size;
|
||||
const MvField *left = &tab_mvf[y_pu * min_pu_width + xp_pu];
|
||||
const MvField *curr = &tab_mvf[y_pu * min_pu_width + xq_pu];
|
||||
uint8_t left_cbf_luma = s->cbf_luma[y_tu * min_tu_width + xp_tu];
|
||||
uint8_t curr_cbf_luma = s->cbf_luma[y_tu * min_tu_width + xq_tu];
|
||||
uint8_t left_cbf_luma = l->cbf_luma[y_tu * min_tu_width + xp_tu];
|
||||
uint8_t curr_cbf_luma = l->cbf_luma[y_tu * min_tu_width + xq_tu];
|
||||
|
||||
if (curr->pred_flag == PF_INTRA || left->pred_flag == PF_INTRA)
|
||||
bs = 2;
|
||||
|
@ -75,7 +75,7 @@ static void pic_arrays_free(HEVCContext *s, HEVCLayerContext *l)
|
||||
av_freep(&l->tab_ct_depth);
|
||||
|
||||
av_freep(&s->tab_ipm);
|
||||
av_freep(&s->cbf_luma);
|
||||
av_freep(&l->cbf_luma);
|
||||
av_freep(&s->is_pcm);
|
||||
|
||||
av_freep(&s->qp_y_tab);
|
||||
@ -113,10 +113,10 @@ static int pic_arrays_init(HEVCContext *s, HEVCLayerContext *l, const HEVCSPS *s
|
||||
if (!l->skip_flag || !l->tab_ct_depth)
|
||||
goto fail;
|
||||
|
||||
s->cbf_luma = av_malloc_array(sps->min_tb_width, sps->min_tb_height);
|
||||
l->cbf_luma = av_malloc_array(sps->min_tb_width, sps->min_tb_height);
|
||||
s->tab_ipm = av_mallocz(min_pu_size);
|
||||
s->is_pcm = av_malloc_array(sps->min_pu_width + 1, sps->min_pu_height + 1);
|
||||
if (!s->tab_ipm || !s->cbf_luma || !s->is_pcm)
|
||||
if (!s->tab_ipm || !l->cbf_luma || !s->is_pcm)
|
||||
goto fail;
|
||||
|
||||
s->filter_slice_edges = av_mallocz(ctb_count);
|
||||
@ -1431,7 +1431,7 @@ do {
|
||||
for (j = 0; j < (1 << log2_trafo_size); j += min_tu_size) {
|
||||
int x_tu = (x0 + j) >> log2_min_tu_size;
|
||||
int y_tu = (y0 + i) >> log2_min_tu_size;
|
||||
s->cbf_luma[y_tu * min_tu_width + x_tu] = 1;
|
||||
l->cbf_luma[y_tu * min_tu_width + x_tu] = 1;
|
||||
}
|
||||
}
|
||||
if (!s->sh.disable_deblocking_filter_flag) {
|
||||
@ -2951,7 +2951,7 @@ static int hevc_frame_start(HEVCContext *s, HEVCLayerContext *l)
|
||||
|
||||
memset(s->horizontal_bs, 0, l->bs_width * l->bs_height);
|
||||
memset(s->vertical_bs, 0, l->bs_width * l->bs_height);
|
||||
memset(s->cbf_luma, 0, sps->min_tb_width * sps->min_tb_height);
|
||||
memset(l->cbf_luma, 0, sps->min_tb_width * sps->min_tb_height);
|
||||
memset(s->is_pcm, 0, (sps->min_pu_width + 1) * (sps->min_pu_height + 1));
|
||||
memset(s->tab_slice_address, -1, pic_size_in_ctb * sizeof(*s->tab_slice_address));
|
||||
|
||||
|
@ -450,6 +450,9 @@ typedef struct HEVCLayerContext {
|
||||
// CU
|
||||
uint8_t *skip_flag;
|
||||
uint8_t *tab_ct_depth;
|
||||
|
||||
// PU
|
||||
uint8_t *cbf_luma; // cbf_luma of colocated TU
|
||||
} HEVCLayerContext;
|
||||
|
||||
typedef struct HEVCContext {
|
||||
@ -510,7 +513,6 @@ typedef struct HEVCContext {
|
||||
// PU
|
||||
uint8_t *tab_ipm;
|
||||
|
||||
uint8_t *cbf_luma; // cbf_luma of colocated TU
|
||||
uint8_t *is_pcm;
|
||||
|
||||
// CTB-level flags affecting loop filter operation
|
||||
|
Loading…
Reference in New Issue
Block a user