mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-14 22:22:59 +02:00
lavc/hevc/cabac: do not infer WPP use based on HEVCContext.threads_number
Pass this information explicitly instead.
This commit is contained in:
parent
d86ac94df2
commit
b0c29a45dc
@ -452,7 +452,8 @@ static void cabac_init_state(HEVCLocalContext *lc, const HEVCContext *s)
|
||||
}
|
||||
|
||||
int ff_hevc_cabac_init(HEVCLocalContext *lc, const HEVCPPS *pps,
|
||||
int ctb_addr_ts, const uint8_t *data, size_t size)
|
||||
int ctb_addr_ts, const uint8_t *data, size_t size,
|
||||
int is_wpp)
|
||||
{
|
||||
const HEVCContext *const s = lc->parent;
|
||||
const HEVCSPS *const sps = pps->sps;
|
||||
@ -479,7 +480,7 @@ int ff_hevc_cabac_init(HEVCLocalContext *lc, const HEVCPPS *pps,
|
||||
if (pps->tiles_enabled_flag &&
|
||||
pps->tile_id[ctb_addr_ts] != pps->tile_id[ctb_addr_ts - 1]) {
|
||||
int ret;
|
||||
if (s->threads_number == 1)
|
||||
if (!is_wpp)
|
||||
ret = cabac_reinit(lc);
|
||||
else {
|
||||
ret = ff_init_cabac_decoder(&lc->cc, data, size);
|
||||
@ -492,7 +493,7 @@ int ff_hevc_cabac_init(HEVCLocalContext *lc, const HEVCPPS *pps,
|
||||
if (ctb_addr_ts % sps->ctb_width == 0) {
|
||||
int ret;
|
||||
get_cabac_terminate(&lc->cc);
|
||||
if (s->threads_number == 1)
|
||||
if (!is_wpp)
|
||||
ret = cabac_reinit(lc);
|
||||
else {
|
||||
ret = ff_init_cabac_decoder(&lc->cc, data, size);
|
||||
|
@ -2599,7 +2599,7 @@ static int hls_decode_entry(HEVCContext *s, GetBitContext *gb)
|
||||
y_ctb = (ctb_addr_rs / ((sps->width + ctb_size - 1) >> sps->log2_ctb_size)) << sps->log2_ctb_size;
|
||||
hls_decode_neighbour(lc, pps, sps, x_ctb, y_ctb, ctb_addr_ts);
|
||||
|
||||
ret = ff_hevc_cabac_init(lc, pps, ctb_addr_ts, slice_data, slice_size);
|
||||
ret = ff_hevc_cabac_init(lc, pps, ctb_addr_ts, slice_data, slice_size, 0);
|
||||
if (ret < 0) {
|
||||
s->tab_slice_address[ctb_addr_rs] = -1;
|
||||
return ret;
|
||||
@ -2669,7 +2669,7 @@ static int hls_decode_entry_wpp(AVCodecContext *avctxt, void *hevc_lclist,
|
||||
return 0;
|
||||
}
|
||||
|
||||
ret = ff_hevc_cabac_init(lc, pps, ctb_addr_ts, data, data_size);
|
||||
ret = ff_hevc_cabac_init(lc, pps, ctb_addr_ts, data, data_size, 1);
|
||||
if (ret < 0)
|
||||
goto error;
|
||||
hls_sao_param(lc, pps, sps,
|
||||
|
@ -579,7 +579,8 @@ int ff_hevc_slice_rpl(HEVCContext *s);
|
||||
void ff_hevc_save_states(HEVCLocalContext *lc, const HEVCPPS *pps,
|
||||
int ctb_addr_ts);
|
||||
int ff_hevc_cabac_init(HEVCLocalContext *lc, const HEVCPPS *pps,
|
||||
int ctb_addr_ts, const uint8_t *data, size_t size);
|
||||
int ctb_addr_ts, const uint8_t *data, size_t size,
|
||||
int is_wpp);
|
||||
int ff_hevc_sao_merge_flag_decode(HEVCLocalContext *lc);
|
||||
int ff_hevc_sao_type_idx_decode(HEVCLocalContext *lc);
|
||||
int ff_hevc_sao_band_position_decode(HEVCLocalContext *lc);
|
||||
|
Loading…
x
Reference in New Issue
Block a user