summaryrefslogtreecommitdiff
path: root/libavcodec/hevc.h
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2015-07-09 14:22:43 +0200
committerAnton Khirnov <anton@khirnov.net>2015-07-12 18:15:39 +0200
commitb11acd57326db6c2cc1475dd0bea2a06fbc85aa2 (patch)
tree64740e507baccb89e4245ba3d2057e8359576ef5 /libavcodec/hevc.h
parentab05ed4c322ed0488ac9b5d2ef5d4ffa55a946a7 (diff)
hevc: remove HEVCContext usage from hevc_ps
Factor out the parameter sets into a separate struct and use it instead. This will allow us to reuse this code in the parser.
Diffstat (limited to 'libavcodec/hevc.h')
-rw-r--r--libavcodec/hevc.h27
1 files changed, 18 insertions, 9 deletions
diff --git a/libavcodec/hevc.h b/libavcodec/hevc.h
index 60377c21de..32c9dc3834 100644
--- a/libavcodec/hevc.h
+++ b/libavcodec/hevc.h
@@ -525,6 +525,17 @@ typedef struct HEVCPPS {
int *min_tb_addr_zs; ///< MinTbAddrZS
} HEVCPPS;
+typedef struct HEVCParamSets {
+ AVBufferRef *vps_list[MAX_VPS_COUNT];
+ AVBufferRef *sps_list[MAX_SPS_COUNT];
+ AVBufferRef *pps_list[MAX_PPS_COUNT];
+
+ /* currently active parameter sets */
+ const HEVCVPS *vps;
+ const HEVCSPS *sps;
+ const HEVCPPS *pps;
+} HEVCParamSets;
+
typedef struct SliceHeader {
unsigned int pps_id;
@@ -769,12 +780,7 @@ typedef struct HEVCContext {
AVFrame *tmp_frame;
AVFrame *output_frame;
- const HEVCVPS *vps;
- const HEVCSPS *sps;
- const HEVCPPS *pps;
- AVBufferRef *vps_list[MAX_VPS_COUNT];
- AVBufferRef *sps_list[MAX_SPS_COUNT];
- AVBufferRef *pps_list[MAX_PPS_COUNT];
+ HEVCParamSets ps;
AVBufferPool *tab_mvf_pool;
AVBufferPool *rpl_tab_pool;
@@ -878,9 +884,12 @@ int ff_hevc_decode_short_term_rps(GetBitContext *gb, AVCodecContext *avctx,
int ff_hevc_parse_sps(HEVCSPS *sps, GetBitContext *gb, unsigned int *sps_id,
int apply_defdispwin, AVBufferRef **vps_list, AVCodecContext *avctx);
-int ff_hevc_decode_nal_vps(HEVCContext *s);
-int ff_hevc_decode_nal_sps(HEVCContext *s);
-int ff_hevc_decode_nal_pps(HEVCContext *s);
+int ff_hevc_decode_nal_vps(GetBitContext *gb, AVCodecContext *avctx,
+ HEVCParamSets *ps);
+int ff_hevc_decode_nal_sps(GetBitContext *gb, AVCodecContext *avctx,
+ HEVCParamSets *ps, int apply_defdispwin);
+int ff_hevc_decode_nal_pps(GetBitContext *gb, AVCodecContext *avctx,
+ HEVCParamSets *ps);
int ff_hevc_decode_nal_sei(HEVCContext *s);
/**