diff options
author | Anton Khirnov <anton@khirnov.net> | 2015-07-09 18:33:52 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2015-07-12 18:15:39 +0200 |
commit | d82e1adc2019135a2fc45372e0ed0b5ef107cdd0 (patch) | |
tree | 7a881512bdb58ae40f9c3096207d007089f37331 /libavcodec/hevc.h | |
parent | ae05b4865514fd71b5e9431e93aa0d03d7ba7751 (diff) | |
download | ffmpeg-d82e1adc2019135a2fc45372e0ed0b5ef107cdd0.tar.gz |
hevc: move splitting the packet into NALUs into a separate function
This function is independent of the decoding context, so we'll be able
to use it in the parser.
Diffstat (limited to 'libavcodec/hevc.h')
-rw-r--r-- | libavcodec/hevc.h | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/libavcodec/hevc.h b/libavcodec/hevc.h index 41b88dbfa8..c6e05bc0bb 100644 --- a/libavcodec/hevc.h +++ b/libavcodec/hevc.h @@ -718,6 +718,13 @@ typedef struct HEVCNAL { int temporal_id; } HEVCNAL; +/* an input packet split into unescaped NAL units */ +typedef struct HEVCPacket { + HEVCNAL *nals; + int nb_nals; + int nals_allocated; +} HEVCPacket; + struct HEVCContext; typedef struct HEVCPredContext { @@ -843,9 +850,7 @@ typedef struct HEVCContext { uint16_t seq_decode; uint16_t seq_output; - HEVCNAL *nals; - int nb_nals; - int nals_allocated; + HEVCPacket pkt; // type of the first VCL NAL of the current frame enum NALUnitType first_nal_type; @@ -1022,6 +1027,12 @@ void ff_hevc_pred_init(HEVCPredContext *hpc, int bit_depth); int ff_hevc_extract_rbsp(const uint8_t *src, int length, HEVCNAL *nal); +/** + * Split an input packet into NAL units. + */ +int ff_hevc_split_packet(HEVCPacket *pkt, const uint8_t *buf, int length, + AVCodecContext *avctx, int is_nalff, int nal_length_size); + int ff_hevc_encode_nal_vps(HEVCVPS *vps, unsigned int id, uint8_t *buf, int buf_size); |