OSDN Git Service

hevc: store the escaped/raw bitstream in HEVCNAL
authorHendrik Leppkes <h.leppkes@gmail.com>
Sun, 25 Jan 2015 12:01:07 +0000 (13:01 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 27 Jan 2015 11:37:34 +0000 (12:37 +0100)
Hardware Accelerators require access to the escaped bitstream.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/hevc.c
libavcodec/hevc.h

index 8f60b3d..bcbb889 100644 (file)
@@ -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;
 }
 
index 8fdefbb..c0fad27 100644 (file)
@@ -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 {