shithub: dav1d

Download patch

ref: 58a4ba072214e2b4a39d1d54821a426c2269e233
parent: c89eb564366dfe11da016a738e4fc609f17710c1
author: Henrik Gramner <[email protected]>
date: Wed Feb 5 22:43:40 EST 2020

Reorder the Dav1dFrameHeader struct to fix alignment issues

The ar_coeff_shift element needs to have a 16-byte alignment on x86.

--- a/include/dav1d/headers.h
+++ b/include/dav1d/headers.h
@@ -329,13 +329,13 @@
 } Dav1dFilmGrainData;
 
 typedef struct Dav1dFrameHeader {
-    enum Dav1dFrameType frame_type; ///< type of the picture
-    int width[2 /* { coded_width, superresolution_upscaled_width } */], height;
-    int frame_offset; ///< frame number
     struct {
-        int present, update;
         Dav1dFilmGrainData data;
+        int present, update;
     } film_grain; ///< film grain parameters
+    enum Dav1dFrameType frame_type; ///< type of the picture
+    int width[2 /* { coded_width, superresolution_upscaled_width } */], height;
+    int frame_offset; ///< frame number
     int temporal_id, spatial_id; ///< spatial and temporal id of the frame for SVC
 
     int show_existing_frame;