21 #ifndef DE265_DECCTX_H
22 #define DE265_DECCTX_H
40 #define DE265_MAX_VPS_SETS 16
41 #define DE265_MAX_SPS_SETS 16
42 #define DE265_MAX_PPS_SETS 64
44 #define MAX_WARNINGS 20
174 assert(n < nThreadContexts);
175 return &thread_contexts[n];
301 bool has_sps(
int id)
const {
return (
bool)sps[id]; }
302 bool has_pps(
int id)
const {
return (
bool)pps[id]; }
304 std::shared_ptr<const seq_parameter_set>
get_shared_sps(
int id) {
return sps[id]; }
305 std::shared_ptr<const pic_parameter_set>
get_shared_pps(
int id) {
return pps[id]; }
374 bool has_image(
int dpb_index)
const {
return dpb_index>=0 && dpb_index<dpb.
size(); }
395 std::shared_ptr<video_parameter_set> current_vps;
396 std::shared_ptr<seq_parameter_set> current_sps;
397 std::shared_ptr<pic_parameter_set> current_pps;
403 int num_worker_threads;
417 int limit_HighestTid;
422 int layer_framerate_ratio;
424 int current_HighestTid;
429 } framedrop_tab[100+1];
430 int framedrop_tid_index[6+1];
432 void compute_framedrop_table();
433 void calc_tid_and_framerate_ratio();
440 int current_image_poc_lsb;
441 bool first_decoded_picture;
442 bool NoRaslOutputFlag;
443 bool HandleCraAsBlaFlag;
444 bool FirstAfterEndOfSequenceNAL;
447 int prevPicOrderCntLsb;
448 int prevPicOrderCntMsb;
468 int NumPocStCurrBefore;
469 int NumPocStCurrAfter;
493 uint8_t nal_unit_type;
501 std::vector<image_unit*> image_units;
503 bool flush_reorder_buffer_at_this_frame;
507 void add_task_decode_CTB_row(
thread_context* tctx,
bool firstSliceSubstream,
int ctbRow);
508 void add_task_decode_slice_segment(
thread_context* tctx,
bool firstSliceSubstream,
511 void mark_whole_slice_as_processed(
image_unit* imgunit,
517 int POC,
bool longTerm);
522 void remove_images_from_dpb(
const std::vector<int>& removeImageList);
523 void run_postprocessing_filters_sequential(
struct de265_image* img);
524 void run_postprocessing_filters_parallel(
image_unit* img);
Definition: nal-parser.h:88
Definition: nal-parser.h:36
virtual ~base_context()
Definition: decctx.h:277
virtual bool has_image(int frame_id) const =0
virtual const de265_image * get_image(int frame_id) const =0
void set_acceleration_functions(enum de265_acceleration)
struct acceleration_functions acceleration
Definition: decctx.h:283
Definition: contextmodel.h:100
struct de265_image * get_next_picture_in_output_queue() const
Definition: dpb.h:93
int num_pictures_in_output_queue() const
Definition: dpb.h:90
void pop_next_picture_in_output_queue()
int size() const
Definition: dpb.h:53
de265_image * get_image(int index)
Definition: dpb.h:57
bool param_disable_deblocking
Definition: decctx.h:353
uint8_t get_nal_unit_type() const
Definition: decctx.h:318
bool has_pps(int id) const
Definition: decctx.h:302
de265_error decode_slice_unit_tiles(image_unit *imgunit, slice_unit *sliceunit)
bool get_RapPicFlag() const
Definition: decctx.h:319
void * param_image_allocation_userdata
Definition: decctx.h:361
int param_sps_headers_fd
Definition: decctx.h:348
int get_current_TID() const
Definition: decctx.h:411
const seq_parameter_set * get_sps(int id) const
Definition: decctx.h:308
int UsedByCurrPicLt[MAX_NUM_REF_PICS]
Definition: decctx.h:461
pic_parameter_set * get_pps(int id)
Definition: decctx.h:309
int param_slice_headers_fd
Definition: decctx.h:351
de265_error decode_NAL(NAL_unit *nal)
int num_pictures_in_output_queue() const
Definition: decctx.h:377
bool process_slice_segment_header(slice_segment_header *, de265_error *, de265_PTS pts, nal_header *nal_hdr, void *user_data)
de265_error decode_slice_unit_sequential(image_unit *imgunit, slice_unit *sliceunit)
de265_image * get_next_picture_in_output_queue()
Definition: decctx.h:376
de265_error decode(int *more)
de265_image * get_image(int dpb_index)
Definition: decctx.h:371
bool param_sei_check_hash
Definition: decctx.h:344
int get_highest_TID() const
int8_t tid
Definition: decctx.h:427
seq_parameter_set * get_sps(int id)
Definition: decctx.h:307
std::shared_ptr< const pic_parameter_set > get_shared_pps(int id)
Definition: decctx.h:305
int param_vps_headers_fd
Definition: decctx.h:349
de265_error push_picture_to_output_queue(image_unit *)
int param_pps_headers_fd
Definition: decctx.h:350
void set_image_allocation_functions(de265_image_allocation *allocfunc, void *userdata)
const pic_parameter_set * get_pps(int id) const
Definition: decctx.h:310
int DeltaPocMsbCycleLt[MAX_NUM_REF_PICS]
Definition: decctx.h:462
de265_error decode_slice_unit_parallel(image_unit *imgunit, slice_unit *sliceunit)
thread_pool thread_pool_
Definition: decctx.h:400
void set_framerate_ratio(int percent)
int PocLsbLt[MAX_NUM_REF_PICS]
Definition: decctx.h:460
bool has_image(int dpb_index) const
Definition: decctx.h:374
void process_nal_hdr(nal_header *)
std::shared_ptr< const seq_parameter_set > get_shared_sps(int id)
Definition: decctx.h:304
const de265_image * get_image(int dpb_index) const
Definition: decctx.h:372
void set_limit_TID(int tid)
int get_num_worker_threads() const
Definition: decctx.h:369
bool param_conceal_stream_errors
Definition: decctx.h:345
NAL_Parser nal_parser
Definition: decctx.h:366
int change_framerate(int more_vs_less)
bool param_disable_sao
Definition: decctx.h:354
void pop_next_picture_in_output_queue()
Definition: decctx.h:378
bool has_sps(int id) const
Definition: decctx.h:301
de265_error decode_slice_unit_WPP(image_unit *imgunit, slice_unit *sliceunit)
int8_t ratio
Definition: decctx.h:428
de265_image_allocation param_image_allocation_functions
Definition: decctx.h:360
bool param_suppress_faulty_pictures
Definition: decctx.h:346
de265_error decode_some(bool *did_work)
de265_error start_thread_pool(int nThreads)
const slice_segment_header * previous_slice_header
Definition: decctx.h:453
void add_warning(de265_error warning, bool once)
de265_error get_warning()
std::vector< thread_task * > tasks
Definition: decctx.h:264
slice_unit * get_prev_slice_segment(slice_unit *s) const
Definition: decctx.h:215
slice_unit * get_next_slice_segment(slice_unit *s) const
Definition: decctx.h:225
enum image_unit::@26 state
std::vector< slice_unit * > slice_units
Definition: decctx.h:202
de265_image * img
Definition: decctx.h:199
de265_image sao_output
Definition: decctx.h:200
std::vector< context_model_table > ctx_models
Definition: decctx.h:269
enum image_unit::@25 role
@ Reference
Definition: decctx.h:254
@ Unknown
Definition: decctx.h:253
@ Leaf
Definition: decctx.h:255
@ Invalid
Definition: decctx.h:252
std::vector< sei_message > suffix_SEIs
Definition: decctx.h:203
@ Unprocessed
Definition: decctx.h:258
@ Decoded
Definition: decctx.h:260
@ InProgress
Definition: decctx.h:259
@ Dropped
Definition: decctx.h:261
bool is_first_slice_segment(const slice_unit *s) const
Definition: decctx.h:247
bool all_slice_segments_processed() const
Definition: decctx.h:241
void dump_slices() const
Definition: decctx.h:235
slice_unit * get_next_unprocessed_slice_segment() const
Definition: decctx.h:205
int first_decoded_CTB_RS
Definition: decctx.h:169
bitreader reader
Definition: decctx.h:152
bool flush_reorder_buffer
Definition: decctx.h:156
int num_thread_contexts() const
Definition: decctx.h:177
slice_segment_header * shdr
Definition: decctx.h:151
int last_decoded_CTB_RS
Definition: decctx.h:170
NAL_unit * nal
Definition: decctx.h:150
de265_progress_lock finished_threads
Definition: decctx.h:166
slice_unit(decoder_context *decctx)
image_unit * imgunit
Definition: decctx.h:154
decoder_context * ctx
Definition: decctx.h:185
SliceDecodingProgress
Definition: decctx.h:161
@ Decoded
Definition: decctx.h:163
@ Unprocessed
Definition: decctx.h:161
@ InProgress
Definition: decctx.h:162
enum slice_unit::SliceDecodingProgress state
void allocate_thread_contexts(int n)
int nThreads
Definition: decctx.h:167
thread_context * get_thread_context(int n)
Definition: decctx.h:173
slice_segment_header * shdr
Definition: decctx.h:114
image_unit * imgunit
Definition: decctx.h:116
uint8_t transform_skip_flag[3]
Definition: decctx.h:78
int32_t residual_luma[32 *32]
Definition: decctx.h:91
int IsCuChromaQpOffsetCoded
Definition: decctx.h:98
int IsCuQpDeltaCoded
Definition: decctx.h:96
int ResScaleVal
Definition: decctx.h:72
struct de265_image * img
Definition: decctx.h:113
int16_t _coeffBuf[(32 *32)+8]
Definition: decctx.h:84
int CtbX
Definition: decctx.h:61
context_model_table ctx_model
Definition: decctx.h:109
int qPYPrime
Definition: decctx.h:105
PBMotionCoding motion
Definition: decctx.h:66
int qPCbPrime
Definition: decctx.h:105
int CuQpOffsetCr
Definition: decctx.h:99
uint8_t StatCoeff[4]
Definition: decctx.h:110
slice_unit * sliceunit
Definition: decctx.h:117
int lastQPYinPreviousQG
Definition: decctx.h:103
int currentQG_y
Definition: decctx.h:102
int CtbY
Definition: decctx.h:61
uint8_t cu_transquant_bypass_flag
Definition: decctx.h:77
int currentQPY
Definition: decctx.h:101
int16_t * coeffBuf
Definition: decctx.h:85
int CuQpDelta
Definition: decctx.h:97
CABAC_decoder cabac_decoder
Definition: decctx.h:107
uint8_t explicit_rdpcm_dir
Definition: decctx.h:80
int16_t coeffList[3][32 *32]
Definition: decctx.h:87
decoder_context * decctx
Definition: decctx.h:112
int16_t nCoeff[3]
Definition: decctx.h:89
int currentQG_x
Definition: decctx.h:102
int qPCrPrime
Definition: decctx.h:105
int16_t coeffPos[3][32 *32]
Definition: decctx.h:88
int CtbAddrInRS
Definition: decctx.h:58
int CuQpOffsetCb
Definition: decctx.h:99
thread_task * task
Definition: decctx.h:118
int CtbAddrInTS
Definition: decctx.h:59
uint8_t explicit_rdpcm_flag
Definition: decctx.h:79
Definition: threads.h:124
Definition: threads.h:102
de265_acceleration
Definition: de265.h:391
int64_t de265_PTS
Definition: de265.h:166
de265_error
Definition: de265.h:82
#define MAX_WARNINGS
Definition: decctx.h:44
#define DE265_MAX_SPS_SETS
Definition: decctx.h:41
#define DE265_MAX_VPS_SETS
Definition: decctx.h:40
#define DE265_MAX_PPS_SETS
Definition: decctx.h:42
QStringView suffix
Definition: itemviewutilities.cpp:594
#define MAX_NUM_REF_PICS
Definition: refpic.h:26
Definition: acceleration.h:30
Definition: bitstream.h:39