Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Buitenhuis <derek.buitenhuis@gmail.com>2016-04-25 16:40:33 +0300
committerDerek Buitenhuis <derek.buitenhuis@gmail.com>2016-04-25 16:40:33 +0300
commit4791a910c0dc3dd5861d38202457c9fb9bf1154c (patch)
tree0f73ac0086bf57db5e3ea48e2457a4a533d96017
parent9ac154d1facd4756db6918f866dccf3e3ffb698c (diff)
lavc/hevc_parse: Don't take a HEVCContext
It's not even used anymore, and the checks are no longer functionally important. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
-rw-r--r--libavcodec/hevc.c2
-rw-r--r--libavcodec/hevc.h4
-rw-r--r--libavcodec/hevc_parse.c11
-rw-r--r--libavcodec/hevc_parser.c2
4 files changed, 9 insertions, 10 deletions
diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c
index 0d53a33d53..785aa7e604 100644
--- a/libavcodec/hevc.c
+++ b/libavcodec/hevc.c
@@ -2866,7 +2866,7 @@ static int decode_nal_units(HEVCContext *s, const uint8_t *buf, int length)
/* split the input packet into NAL units, so we know the upper bound on the
* number of slices in the frame */
- ret = ff_hevc_split_packet(s, &s->pkt, buf, length, s->avctx, s->is_nalff,
+ ret = ff_hevc_split_packet(&s->pkt, buf, length, s->avctx, s->is_nalff,
s->nal_length_size);
if (ret < 0) {
av_log(s->avctx, AV_LOG_ERROR,
diff --git a/libavcodec/hevc.h b/libavcodec/hevc.h
index c91f815857..5865f65f1c 100644
--- a/libavcodec/hevc.h
+++ b/libavcodec/hevc.h
@@ -1080,13 +1080,13 @@ void ff_hevc_hls_mvd_coding(HEVCContext *s, int x0, int y0, int log2_cb_size);
/**
* Extract the raw (unescaped) HEVC bitstream.
*/
-int ff_hevc_extract_rbsp(HEVCContext *s, const uint8_t *src, int length,
+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(HEVCContext *s, HEVCPacket *pkt, const uint8_t *buf, int length,
+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,
diff --git a/libavcodec/hevc_parse.c b/libavcodec/hevc_parse.c
index d557cc7f04..6ee8496419 100644
--- a/libavcodec/hevc_parse.c
+++ b/libavcodec/hevc_parse.c
@@ -29,14 +29,13 @@
/* FIXME: This is adapted from ff_h264_decode_nal, avoiding duplication
* between these functions would be nice. */
-int ff_hevc_extract_rbsp(HEVCContext *s, const uint8_t *src, int length,
+int ff_hevc_extract_rbsp(const uint8_t *src, int length,
HEVCNAL *nal)
{
int i, si, di;
uint8_t *dst;
- if (s)
- nal->skipped_bytes = 0;
+ nal->skipped_bytes = 0;
#define STARTCODE_TEST \
if (i + 2 < length && src[i + 1] == 0 && src[i + 2] <= 3) { \
if (src[i + 2] != 3) { \
@@ -110,7 +109,7 @@ int ff_hevc_extract_rbsp(HEVCContext *s, const uint8_t *src, int length,
dst[di++] = 0;
si += 3;
- if (s && nal->skipped_bytes_pos) {
+ if (nal->skipped_bytes_pos) {
nal->skipped_bytes++;
if (nal->skipped_bytes_pos_size < nal->skipped_bytes) {
nal->skipped_bytes_pos_size *= 2;
@@ -205,7 +204,7 @@ static int hls_nal_unit(HEVCNAL *nal, AVCodecContext *avctx)
}
-int ff_hevc_split_packet(HEVCContext *s, HEVCPacket *pkt, const uint8_t *buf, int length,
+int ff_hevc_split_packet(HEVCPacket *pkt, const uint8_t *buf, int length,
AVCodecContext *avctx, int is_nalff, int nal_length_size)
{
int consumed, ret = 0;
@@ -269,7 +268,7 @@ int ff_hevc_split_packet(HEVCContext *s, HEVCPacket *pkt, const uint8_t *buf, in
}
nal = &pkt->nals[pkt->nb_nals];
- consumed = ff_hevc_extract_rbsp(s, buf, extract_length, nal);
+ consumed = ff_hevc_extract_rbsp(buf, extract_length, nal);
if (consumed < 0)
return consumed;
diff --git a/libavcodec/hevc_parser.c b/libavcodec/hevc_parser.c
index 4625e6149a..59893bb3e1 100644
--- a/libavcodec/hevc_parser.c
+++ b/libavcodec/hevc_parser.c
@@ -239,7 +239,7 @@ static inline int parse_nal_units(AVCodecParserContext *s, const uint8_t *buf,
src_length = 20;
}
- consumed = ff_hevc_extract_rbsp(NULL, buf, src_length, nal);
+ consumed = ff_hevc_extract_rbsp(buf, src_length, nal);
if (consumed < 0)
return consumed;