OSDN Git Service

hevc: store the escaped/raw bitstream in HEVCNAL
authorHendrik Leppkes <h.leppkes@gmail.com>
Sun, 25 Jan 2015 11:58:46 +0000 (12:58 +0100)
committerAnton Khirnov <anton@khirnov.net>
Tue, 27 Jan 2015 08:04:44 +0000 (09:04 +0100)
Hardware Accelerators require access to the escaped bitstream.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
libavcodec/hevc.c
libavcodec/hevc.h

index de76ba0..560d52c 100644 (file)
@@ -2657,8 +2657,10 @@ static int extract_rbsp(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;
     }
 
@@ -2697,6 +2699,8 @@ nsc:
 
     nal->data = dst;
     nal->size = di;
+    nal->raw_data = src;
+    nal->raw_size = si;
     return si;
 }
 
index 37131cd..c4162e7 100644 (file)
@@ -692,6 +692,9 @@ typedef struct HEVCNAL {
 
     int size;
     const uint8_t *data;
+
+    int raw_size;
+    const uint8_t *raw_data;
 } HEVCNAL;
 
 struct HEVCContext;