diff mbox

[FFmpeg-devel,v2,2/2] lavc/h2645_parse: Reorder H2645NAL to reduce size

Message ID 20191206031542.20853-2-andriy.gelman@gmail.com
State New
Headers show

Commit Message

Andriy Gelman Dec. 6, 2019, 3:15 a.m. UTC
From: Andriy Gelman <andriy.gelman@gmail.com>

Size of H2645NAL reduced from 112 to 104 bytes on x86-64.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
---
 libavcodec/h2645_parse.h | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)
diff mbox

Patch

diff --git a/libavcodec/h2645_parse.h b/libavcodec/h2645_parse.h
index 3e47f86c53b..b88707f207c 100644
--- a/libavcodec/h2645_parse.h
+++ b/libavcodec/h2645_parse.h
@@ -32,8 +32,8 @@ 
 typedef struct H2645NAL {
     uint8_t *rbsp_buffer;
 
-    int size;
     const uint8_t *data;
+    int size;
 
     /**
      * Size, in bits, of just the data, excluding the stop bit and any trailing
@@ -41,16 +41,16 @@  typedef struct H2645NAL {
      */
     int size_bits;
 
-    int raw_size;
-    const uint8_t *raw_data;
-
-    GetBitContext gb;
-
     /**
      * NAL unit type
      */
     int type;
 
+    int raw_size;
+    const uint8_t *raw_data;
+
+    GetBitContext gb;
+
     /**
      * HEVC only, nuh_temporal_id_plus_1 - 1
      */
@@ -61,13 +61,14 @@  typedef struct H2645NAL {
      */
     int nuh_layer_id;
 
-    int skipped_bytes;
-    int skipped_bytes_pos_size;
-    int *skipped_bytes_pos;
     /**
      * H.264 only, nal_ref_idc
      */
     int ref_idc;
+
+    int skipped_bytes;
+    int skipped_bytes_pos_size;
+    int *skipped_bytes_pos;
 } H2645NAL;
 
 typedef struct H2645RBSP {