History

lavc/hevcdec: move HEVCContext.deblock to HEVCLayerContext

Anton Khirnov committed 2 years ago

Commit ed2d25e1 parent 3d4294e3 files · +10 −10Browse files

Showing the changes to libavcodec (3 of 3 files). Show all

Unified · Split

3 files
  1. libavcodec/hevc/filter.c +4 −4
  2. libavcodec/hevc/hevcdec.c +5 −5
  3. libavcodec/hevc/hevcdec.h +1 −1
libavcodec/hevc/filter.c+4−4
@@ -515,8 +515,8 @@ static void deblocking_filter_CTB(const HEVCContext *s, const HEVCLayerContext * · 514 unmodified lines
515515 int ctb_size = 1 << log2_ctb_size;
516516 int ctb = (x0 >> log2_ctb_size) +
517517 (y0 >> log2_ctb_size) * sps->ctb_width;
518− int cur_tc_offset = s->deblock[ctb].tc_offset;
519− int cur_beta_offset = s->deblock[ctb].beta_offset;
518+ int cur_tc_offset = l->deblock[ctb].tc_offset;
519+ int cur_beta_offset = l->deblock[ctb].beta_offset;
520520 int left_tc_offset, left_beta_offset;
521521 int tc_offset, beta_offset;
522522 int pcmf = (sps->pcm_enabled &&
@@ -524,8 +524,8 @@ static void deblocking_filter_CTB(const HEVCContext *s, const HEVCLayerContext * · 1 unmodified line
524524 pps->transquant_bypass_enable_flag;
525525
526526 if (x0) {
527− left_tc_offset = s->deblock[ctb - 1].tc_offset;
528− left_beta_offset = s->deblock[ctb - 1].beta_offset;
527+ left_tc_offset = l->deblock[ctb - 1].tc_offset;
528+ left_beta_offset = l->deblock[ctb - 1].beta_offset;
529529 } else {
530530 left_tc_offset = 0;
531531 left_beta_offset = 0;
libavcodec/hevc/hevcdec.c+5−5
@@ -69,7 +69,7 @@ static const uint8_t hevc_pel_weight[65] = { [2] = 0, [4] = 1, [6] = 2, [8] = 3, · 68 unmodified lines
6969 static void pic_arrays_free(HEVCContext *s, HEVCLayerContext *l)
7070 {
7171 av_freep(&l->sao);
72− av_freep(&s->deblock);
72+ av_freep(&l->deblock);
7373
7474 av_freep(&s->skip_flag);
7575 av_freep(&s->tab_ct_depth);
@@ -104,8 +104,8 @@ static int pic_arrays_init(HEVCContext *s, HEVCLayerContext *l, const HEVCSPS *s · 28 unmodified lines
104104 l->bs_height = (height >> 2) + 1;
105105
106106 l->sao = av_calloc(ctb_count, sizeof(*l->sao));
107− s->deblock = av_calloc(ctb_count, sizeof(*s->deblock));
108− if (!l->sao || !s->deblock)
107+ l->deblock = av_calloc(ctb_count, sizeof(*l->deblock));
108+ if (!l->sao || !l->deblock)
109109 goto fail;
110110
111111 s->skip_flag = av_malloc_array(sps->min_cb_height, sps->min_cb_width);
@@ -2559,8 +2559,8 @@ static int hls_decode_entry(HEVCContext *s, GetBitContext *gb) · 2447 unmodified lines
25592559 hls_sao_param(lc, l, pps, sps,
25602560 x_ctb >> sps->log2_ctb_size, y_ctb >> sps->log2_ctb_size);
25612561
2562− s->deblock[ctb_addr_rs].beta_offset = s->sh.beta_offset;
2563− s->deblock[ctb_addr_rs].tc_offset = s->sh.tc_offset;
2562+ l->deblock[ctb_addr_rs].beta_offset = s->sh.beta_offset;
2563+ l->deblock[ctb_addr_rs].tc_offset = s->sh.tc_offset;
25642564 s->filter_slice_edges[ctb_addr_rs] = s->sh.slice_loop_filter_across_slices_enabled_flag;
25652565
25662566 more_data = hls_coding_quadtree(lc, l, pps, sps, x_ctb, y_ctb, sps->log2_ctb_size, 0);
libavcodec/hevc/hevcdec.h+1−1
@@ -445,6 +445,7 @@ typedef struct HEVCLayerContext { · 444 unmodified lines
445445 int bs_height;
446446
447447 SAOParams *sao;
448+ DBParams *deblock;
448449 } HEVCLayerContext;
449450
450451 typedef struct HEVCContext {
@@ -478,7 +479,6 @@ typedef struct HEVCContext { · 27 unmodified lines
478479 const HEVCVPS *vps; ///< RefStruct reference
479480 const HEVCPPS *pps; ///< RefStruct reference
480481 SliceHeader sh;
481− DBParams *deblock;
482482 enum HEVCNALUnitType nal_unit_type;
483483 int temporal_id; ///< temporal_id_plus1 - 1
484484 HEVCFrame *cur_frame;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t