diff options
author | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2016-04-26 13:38:45 +0100 |
---|---|---|
committer | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2016-04-26 13:56:47 +0100 |
commit | 3c4ca4c5d7992e545a6cbad440287f9e27f1a696 (patch) | |
tree | 110fffd8d88093550fa8a023e513542ac4742fda /libavcodec/h2645_parse.h | |
parent | 492d229303a8d4270eda4d3be0e45d9e0caad0a8 (diff) | |
parent | fa936a307f5cddfc2664600157a8207ca8080af6 (diff) | |
download | ffmpeg-3c4ca4c5d7992e545a6cbad440287f9e27f1a696.tar.gz |
Merge commit 'fa936a307f5cddfc2664600157a8207ca8080af6'
* commit 'fa936a307f5cddfc2664600157a8207ca8080af6':
hevc_parse: rename into h2645_parse
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Diffstat (limited to 'libavcodec/h2645_parse.h')
-rw-r--r-- | libavcodec/h2645_parse.h | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/libavcodec/h2645_parse.h b/libavcodec/h2645_parse.h new file mode 100644 index 0000000000..1724756872 --- /dev/null +++ b/libavcodec/h2645_parse.h @@ -0,0 +1,68 @@ +/* + * H.264/HEVC common parsing code + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_H2645_PARSE_H +#define AVCODEC_H2645_PARSE_H + +#include <stdint.h> + +#include "avcodec.h" +#include "get_bits.h" + +typedef struct H2645NAL { + uint8_t *rbsp_buffer; + int rbsp_buffer_size; + + int size; + const uint8_t *data; + + int raw_size; + const uint8_t *raw_data; + + GetBitContext gb; + + int type; + int temporal_id; + + int skipped_bytes; + int skipped_bytes_pos_size; + int *skipped_bytes_pos; +} H2645NAL; + +/* an input packet split into unescaped NAL units */ +typedef struct H2645Packet { + H2645NAL *nals; + int nb_nals; + int nals_allocated; +} H2645Packet; + +/** + * Extract the raw (unescaped) bitstream. + */ +int ff_h2645_extract_rbsp(const uint8_t *src, int length, + H2645NAL *nal); + +/** + * Split an input packet into NAL units. + */ +int ff_h2645_packet_split(H2645Packet *pkt, const uint8_t *buf, int length, + AVCodecContext *avctx, int is_nalff, int nal_length_size); + +#endif /* AVCODEC_H2645_PARSE_H */ |