aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2015-01-25 13:01:07 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-01-27 12:37:34 +0100
commit2af82a1ad9f788ec3c1d22e15423996a4b161934 (patch)
tree6036e6676e748554c64eb71bd78989e241a15381
parentafa3c996fed4097ecfe86b18c264ba57272e1e99 (diff)
downloadffmpeg-2af82a1ad9f788ec3c1d22e15423996a4b161934.tar.gz
hevc: store the escaped/raw bitstream in HEVCNAL
Hardware Accelerators require access to the escaped bitstream. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/hevc.c8
-rw-r--r--libavcodec/hevc.h3
2 files changed, 9 insertions, 2 deletions
diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c
index 8f60b3d736..bcbb889dfa 100644
--- a/libavcodec/hevc.c
+++ b/libavcodec/hevc.c
@@ -2772,8 +2772,10 @@ int ff_hevc_extract_rbsp(HEVCContext *s, const uint8_t *src, int length,
#endif /* HAVE_FAST_UNALIGNED */
if (i >= length - 1) { // no escaped 0
- nal->data = src;
- nal->size = length;
+ nal->data =
+ nal->raw_data = src;
+ nal->size =
+ nal->raw_size = length;
return length;
}
@@ -2823,6 +2825,8 @@ nsc:
nal->data = dst;
nal->size = di;
+ nal->raw_data = src;
+ nal->raw_size = si;
return si;
}
diff --git a/libavcodec/hevc.h b/libavcodec/hevc.h
index 8fdefbbdcf..c0fad27c48 100644
--- a/libavcodec/hevc.h
+++ b/libavcodec/hevc.h
@@ -734,6 +734,9 @@ typedef struct HEVCNAL {
int size;
const uint8_t *data;
+
+ int raw_size;
+ const uint8_t *raw_data;
} HEVCNAL;
typedef struct HEVCLocalContext {