summaryrefslogtreecommitdiff
path: root/libavcodec/hevc.h
diff options
context:
space:
mode:
authorMickaƫl Raulet <mraulet@insa-rennes.fr>2013-10-21 11:49:35 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-10-22 20:20:40 +0200
commit0c8aba3842a718eb9139fc88b7b60dc79e127bd7 (patch)
tree5f688a62b6e74e920f54450cc4a313ebcfe06877 /libavcodec/hevc.h
parente146c326b91297ff900db632eb0dba30289e9ee6 (diff)
hevc: add wavefront parallel processing
cherry picked from commit b971f2c8fdc60f8bab605a6e8060492eb548a53a cherry picked from commit e57b0a2c915ce6b8a9d57b8292f6581f0680842e Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/hevc.h')
-rw-r--r--libavcodec/hevc.h38
1 files changed, 26 insertions, 12 deletions
diff --git a/libavcodec/hevc.h b/libavcodec/hevc.h
index 000ccd46d6..01db69b74b 100644
--- a/libavcodec/hevc.h
+++ b/libavcodec/hevc.h
@@ -39,6 +39,9 @@
#define MAX_DPB_SIZE 16 // A.4.1
#define MAX_REFS 16
+#define MAX_NB_THREADS 16
+#define SHIFT_CTB_WPP 2
+
/**
* 7.4.2.1
*/
@@ -563,6 +566,9 @@ typedef struct SliceHeader {
uint8_t slice_loop_filter_across_slices_enabled_flag;
+ int *entry_point_offset;
+ int * offset;
+ int * size;
int num_entry_point_offsets;
uint8_t luma_log2_weight_denom;
@@ -705,14 +711,6 @@ typedef struct HEVCFrame {
AVBufferRef *rpl_buf;
} HEVCFrame;
-typedef struct FilterData {
- int x;
- int y;
- int size;
- int slice_or_tiles_left_boundary;
- int slice_or_tiles_up_boundary;
-} FilterData;
-
typedef struct HEVCNAL {
uint8_t *rbsp_buffer;
int rbsp_buffer_size;
@@ -745,20 +743,24 @@ typedef struct HEVCLocalContext {
PredictionUnit pu;
NeighbourAvailable na;
DECLARE_ALIGNED(16, int16_t, mc_buffer[(MAX_PB_SIZE + 7) * MAX_PB_SIZE]);
- FilterData *save_boundary_strengths;
- int nb_saved;
} HEVCLocalContext;
typedef struct HEVCContext {
const AVClass *c; // needed by private avoptions
AVCodecContext *avctx;
- HEVCLocalContext HEVClc;
+ struct HEVCContext *sList[MAX_NB_THREADS];
+
+ HEVCLocalContext *HEVClcList[MAX_NB_THREADS];
+ HEVCLocalContext *HEVClc;
+
+ uint8_t threads_type;
+ uint8_t threads_number;
int width;
int height;
- uint8_t cabac_state[HEVC_CONTEXTS];
+ uint8_t *cabac_state;
AVFrame *frame;
AVFrame *sao_frame;
@@ -826,6 +828,18 @@ typedef struct HEVCContext {
uint16_t seq_decode;
uint16_t seq_output;
+ int enable_parallel_tiles;
+ int wpp_err;
+ int skipped_bytes;
+ int *skipped_bytes_pos;
+ int skipped_bytes_pos_size;
+
+ int *skipped_bytes_nal;
+ int **skipped_bytes_pos_nal;
+ int *skipped_bytes_pos_size_nal;
+
+ uint8_t *data;
+
HEVCNAL *nals;
int nb_nals;
int nals_allocated;