SDL: Added the Chrome HDR tonemap operator

From 54c2ba6afd776d0d0c8f2bc438ad34d49a9cd87c Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Wed, 21 Feb 2024 09:03:03 -0800
Subject: [PATCH] Added the Chrome HDR tonemap operator

Also added support for the SDL_PIXELFORMAT_XBGR2101010 pixel format to the D3D12, D3D11, and Metal renderers.
---
 include/SDL3/SDL_surface.h                    |    4 +-
 .../direct3d11/D3D11_PixelShader_Advanced.h   | 1060 ++++
 .../D3D11_PixelShader_Advanced.hlsl           |    7 +
 .../direct3d11/D3D11_PixelShader_Colors.h     |  118 +-
 .../direct3d11/D3D11_PixelShader_Common.incl  |  175 +-
 .../direct3d11/D3D11_PixelShader_HDR10.h      |  507 --
 .../direct3d11/D3D11_PixelShader_HDR10.hlsl   |   45 -
 .../direct3d11/D3D11_PixelShader_NV12.h       |  545 --
 .../direct3d11/D3D11_PixelShader_NV12.hlsl    |   20 -
 .../direct3d11/D3D11_PixelShader_NV21.h       |  548 --
 .../direct3d11/D3D11_PixelShader_NV21.hlsl    |   20 -
 .../direct3d11/D3D11_PixelShader_Textures.h   |  120 +-
 src/render/direct3d11/D3D11_PixelShader_YUV.h |  580 --
 .../direct3d11/D3D11_PixelShader_YUV.hlsl     |   22 -
 src/render/direct3d11/SDL_render_d3d11.c      |  200 +-
 src/render/direct3d11/SDL_shaders_d3d11.c     |   23 +-
 src/render/direct3d11/SDL_shaders_d3d11.h     |    7 +-
 src/render/direct3d11/compile_shaders.bat     |    5 +-
 .../direct3d12/D3D12_PixelShader_Advanced.h   | 1387 +++++
 ...1.hlsl => D3D12_PixelShader_Advanced.hlsl} |   22 +-
 .../direct3d12/D3D12_PixelShader_Colors.h     |  442 +-
 .../direct3d12/D3D12_PixelShader_Colors.hlsl  |    2 +-
 .../direct3d12/D3D12_PixelShader_Common.incl  |  175 +-
 .../direct3d12/D3D12_PixelShader_HDR10.h      |  856 ---
 .../direct3d12/D3D12_PixelShader_HDR10.hlsl   |   56 -
 .../direct3d12/D3D12_PixelShader_NV12.h       |  729 ---
 .../direct3d12/D3D12_PixelShader_NV12.hlsl    |   31 -
 .../direct3d12/D3D12_PixelShader_NV21.h       |  729 ---
 .../direct3d12/D3D12_PixelShader_Textures.h   |  495 +-
 .../D3D12_PixelShader_Textures.hlsl           |    6 +-
 src/render/direct3d12/D3D12_PixelShader_YUV.h |  745 ---
 .../direct3d12/D3D12_PixelShader_YUV.hlsl     |   34 -
 ...RootSig_YUV.h => D3D12_RootSig_Advanced.h} |    2 +-
 src/render/direct3d12/D3D12_RootSig_NV.h      |   27 -
 src/render/direct3d12/D3D12_VertexShader.hlsl |   23 +-
 ...er_YUV.h => D3D12_VertexShader_Advanced.h} |  434 +-
 src/render/direct3d12/D3D12_VertexShader_NV.h |  647 --
 src/render/direct3d12/SDL_render_d3d12.c      |  230 +-
 src/render/direct3d12/SDL_shaders_d3d12.c     |   58 +-
 src/render/direct3d12/SDL_shaders_d3d12.h     |   12 +-
 src/render/direct3d12/compile_shaders.bat     |   11 +-
 src/render/metal/SDL_render_metal.m           |  203 +-
 src/render/metal/SDL_shaders_metal.metal      |  240 +-
 src/render/metal/SDL_shaders_metal_ios.h      | 4603 +++++++-------
 .../metal/SDL_shaders_metal_iphonesimulator.h | 5369 ++++++++---------
 src/render/metal/SDL_shaders_metal_macos.h    | 4475 ++++++--------
 src/render/metal/SDL_shaders_metal_tvos.h     | 4603 +++++++-------
 .../metal/SDL_shaders_metal_tvsimulator.h     | 5366 ++++++++--------
 src/video/SDL_blit_slow.c                     |  130 +-
 src/video/SDL_surface.c                       |    6 +-
 50 files changed, 15071 insertions(+), 21083 deletions(-)
 create mode 100644 src/render/direct3d11/D3D11_PixelShader_Advanced.h
 create mode 100644 src/render/direct3d11/D3D11_PixelShader_Advanced.hlsl
 delete mode 100644 src/render/direct3d11/D3D11_PixelShader_HDR10.h
 delete mode 100644 src/render/direct3d11/D3D11_PixelShader_HDR10.hlsl
 delete mode 100644 src/render/direct3d11/D3D11_PixelShader_NV12.h
 delete mode 100644 src/render/direct3d11/D3D11_PixelShader_NV12.hlsl
 delete mode 100644 src/render/direct3d11/D3D11_PixelShader_NV21.h
 delete mode 100644 src/render/direct3d11/D3D11_PixelShader_NV21.hlsl
 delete mode 100644 src/render/direct3d11/D3D11_PixelShader_YUV.h
 delete mode 100644 src/render/direct3d11/D3D11_PixelShader_YUV.hlsl
 create mode 100644 src/render/direct3d12/D3D12_PixelShader_Advanced.h
 rename src/render/direct3d12/{D3D12_PixelShader_NV21.hlsl => D3D12_PixelShader_Advanced.hlsl} (50%)
 delete mode 100644 src/render/direct3d12/D3D12_PixelShader_HDR10.h
 delete mode 100644 src/render/direct3d12/D3D12_PixelShader_HDR10.hlsl
 delete mode 100644 src/render/direct3d12/D3D12_PixelShader_NV12.h
 delete mode 100644 src/render/direct3d12/D3D12_PixelShader_NV12.hlsl
 delete mode 100644 src/render/direct3d12/D3D12_PixelShader_NV21.h
 delete mode 100644 src/render/direct3d12/D3D12_PixelShader_YUV.h
 delete mode 100644 src/render/direct3d12/D3D12_PixelShader_YUV.hlsl
 rename src/render/direct3d12/{D3D12_RootSig_YUV.h => D3D12_RootSig_Advanced.h} (97%)
 delete mode 100644 src/render/direct3d12/D3D12_RootSig_NV.h
 rename src/render/direct3d12/{D3D12_VertexShader_YUV.h => D3D12_VertexShader_Advanced.h} (74%)
 delete mode 100644 src/render/direct3d12/D3D12_VertexShader_NV.h

diff --git a/include/SDL3/SDL_surface.h b/include/SDL3/SDL_surface.h
index 0bfcafde0318f..f58b39b7a33da 100644
--- a/include/SDL3/SDL_surface.h
+++ b/include/SDL3/SDL_surface.h
@@ -212,9 +212,9 @@ extern DECLSPEC void SDLCALL SDL_DestroySurface(SDL_Surface *surface);
  *   for YUV surfaces.
  * - `SDL_PROP_SURFACE_MAXCLL_NUMBER`: MaxCLL (Maximum Content Light Level) indicates the maximum light level of any single pixel (in cd/m2 or nits) of the content. MaxCLL is usually measured off the final delivered content after mastering. If one uses the full light level of the HDR mastering display and adds a hard clip at its maximum value, MaxCLL would be equal to the peak luminance of the mastering monitor. This defaults to 400 for HDR10 surfaces.
  * - `SDL_PROP_SURFACE_MAXFALL_NUMBER`: MaxFALL (Maximum Frame Average Light Level) indicates the maximum value of the frame average light level (in cd/m2 or nits) of the content. MaxFALL is calculated by averaging the decoded luminance values of all the pixels within a frame. MaxFALL is usually much lower than MaxCLL.
- * - `SDL_PROP_SURFACE_SDR_WHITE_POINT_FLOAT`: for HDR10 and floating point surfaces, this defines the value of 100% diffuse white, with higher values being displayed in the High Dynamic Range headroom. This defaults to 100 for surfaces using the PQ colorspace and 1.0 for other surfaces.
+ * - `SDL_PROP_SURFACE_SDR_WHITE_POINT_FLOAT`: for HDR10 and floating point surfaces, this defines the value of 100% diffuse white, with higher values being displayed in the High Dynamic Range headroom. This defaults to 100 for HDR10 surfaces and 1.0 for other surfaces.
  * - `SDL_PROP_SURFACE_HDR_HEADROOM_FLOAT`: for HDR10 and floating point surfaces, this defines the maximum dynamic range used by the content, in terms of the SDR white point. This defaults to SDL_PROP_SURFACE_MAXCLL_NUMBER / SDL_PROP_SURFACE_SDR_WHITE_POINT_FLOAT, or 4.0, for HDR10 surfaces.
- * - `SDL_PROP_SURFACE_TONEMAP_OPERATOR_STRING`: the tone mapping operator used when converting between different SDR/HDR ranges. Currently this supports the form "*=N", where N is a floating point scale factor applied in linear space.
+ * - `SDL_PROP_SURFACE_TONEMAP_OPERATOR_STRING`: the tone mapping operator used when compressing from a surface with high dynamic range to another with lower dynamic range. Currently this supports "chrome", which uses the same tone mapping that Chrome uses for HDR content, the form "*=N", where N is a floating point scale factor applied in linear space, and "none", which disables tone mapping. This defaults to "chrome".
  *
  * \param surface the SDL_Surface structure to query
  * \returns a valid property ID on success or 0 on failure; call
diff --git a/src/render/direct3d11/D3D11_PixelShader_Advanced.h b/src/render/direct3d11/D3D11_PixelShader_Advanced.h
new file mode 100644
index 0000000000000..a1297c981cffa
--- /dev/null
+++ b/src/render/direct3d11/D3D11_PixelShader_Advanced.h
@@ -0,0 +1,1060 @@
+#if 0
+//
+// Generated by Microsoft (R) HLSL Shader Compiler 10.1
+//
+//
+// Buffer Definitions: 
+//
+// cbuffer Constants
+// {
+//
+//   float scRGB_output;                // Offset:    0 Size:     4
+//   float texture_type;                // Offset:    4 Size:     4
+//   float input_type;                  // Offset:    8 Size:     4
+//   float color_scale;                 // Offset:   12 Size:     4
+//   float tonemap_method;              // Offset:   16 Size:     4
+//   float tonemap_factor1;             // Offset:   20 Size:     4
+//   float tonemap_factor2;             // Offset:   24 Size:     4
+//   float sdr_white_point;             // Offset:   28 Size:     4
+//   float4 Yoffset;                    // Offset:   32 Size:    16
+//   float4 Rcoeff;                     // Offset:   48 Size:    16
+//   float4 Gcoeff;                     // Offset:   64 Size:    16
+//   float4 Bcoeff;                     // Offset:   80 Size:    16
+//
+// }
+//
+//
+// Resource Bindings:
+//
+// Name                                 Type  Format         Dim      HLSL Bind  Count
+// ------------------------------ ---------- ------- ----------- -------------- ------
+// sampler0                          sampler      NA          NA             s0      1 
+// texture0                          texture  float4          2d             t0      1 
+// texture1                          texture  float4          2d             t1      1 
+// texture2                          texture  float4          2d             t2      1 
+// Constants                         cbuffer      NA          NA            cb0      1 
+//
+//
+//
+// Input signature:
+//
+// Name                 Index   Mask Register SysValue  Format   Used
+// -------------------- ----- ------ -------- -------- ------- ------
+// SV_POSITION              0   xyzw        0      POS   float       
+// TEXCOORD                 0   xy          1     NONE   float   xy  
+// COLOR                    0   xyzw        2     NONE   float   xyzw
+//
+//
+// Output signature:
+//
+// Name                 Index   Mask Register SysValue  Format   Used
+// -------------------- ----- ------ -------- -------- ------- ------
+// SV_TARGET                0   xyzw        0   TARGET   float   xyzw
+//
+ps_5_0
+dcl_globalFlags refactoringAllowed
+dcl_constantbuffer CB0[6], immediateIndexed
+dcl_sampler s0, mode_default
+dcl_resource_texture2d (float,float,float,float) t0
+dcl_resource_texture2d (float,float,float,float) t1
+dcl_resource_texture2d (float,float,float,float) t2
+dcl_input_ps linear v1.xy
+dcl_input_ps linear v2.xyzw
+dcl_output o0.xyzw
+dcl_temps 7
+eq r0.xyzw, cb0[0].yzzz, l(0.000000, 3.000000, 2.000000, 1.000000)
+if_nz r0.x
+  mov r1.xyzw, l(1.000000,1.000000,1.000000,1.000000)
+else 
+  eq r0.x, cb0[0].y, l(1.000000)
+  if_nz r0.x
+    sample_indexable(texture2d)(float,float,float,float) r1.xyzw, v1.xyxx, t0.xyzw, s0
+  else 
+    eq r0.x, cb0[0].y, l(2.000000)
+    if_nz r0.x
+      sample_indexable(texture2d)(float,float,float,float) r2.x, v1.xyxx, t0.xyzw, s0
+      sample_indexable(texture2d)(float,float,float,float) r2.yz, v1.xyxx, t1.zxyw, s0
+      add r2.xyz, r2.xyzx, cb0[2].xyzx
+      dp3 r1.x, r2.xyzx, cb0[3].xyzx
+      dp3 r1.y, r2.xyzx, cb0[4].xyzx
+      dp3 r1.z, r2.xyzx, cb0[5].xyzx
+    else 
+      eq r0.x, cb0[0].y, l(3.000000)
+      if_nz r0.x
+        sample_indexable(texture2d)(float,float,float,float) r2.x, v1.xyxx, t0.xyzw, s0
+        sample_indexable(texture2d)(float,float,float,float) r2.yz, v1.xyxx, t1.zyxw, s0
+        add r2.xyz, r2.xyzx, cb0[2].xyzx
+        dp3 r1.x, r2.xyzx, cb0[3].xyzx
+        dp3 r1.y, r2.xyzx, cb0[4].xyzx
+        dp3 r1.z, r2.xyzx, cb0[5].xyzx
+      else 
+        eq r0.x, cb0[0].y, l(4.000000)
+        if_nz r0.x
+          sample_indexable(texture2d)(float,float,float,float) r2.x, v1.xyxx, t0.xyzw, s0
+          sample_indexable(texture2d)(float,float,float,float) r2.y, v1.xyxx, t1.yxzw, s0
+          sample_indexable(texture2d)(float,float,float,float) r2.z, v1.xyxx, t2.yzxw, s0
+          add r2.xyz, r2.xyzx, cb0[2].xyzx
+          dp3 r1.x, r2.xyzx, cb0[3].xyzx
+          dp3 r1.y, r2.xyzx, cb0[4].xyzx
+          dp3 r1.z, r2.xyzx, cb0[5].xyzx
+        else 
+          mov r1.xyz, l(1.000000,0,0,0)
+        endif 
+      endif 
+    endif 
+    mov r1.w, l(1.000000)
+  endif 
+endif 
+log r2.xyz, |r1.xyzx|
+mul r2.xyz, r2.xyzx, l(0.012683, 0.012683, 0.012683, 0.000000)
+exp r2.xyz, r2.xyzx
+add r3.xyz, r2.xyzx, l(-0.835938, -0.835938, -0.835938, 0.000000)
+max r3.xyz, r3.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
+mad r2.xyz, -r2.xyzx, l(18.687500, 18.687500, 18.687500, 0.000000), l(18.851562, 18.851562, 18.851562, 0.000000)
+div r2.xyz, r3.xyzx, r2.xyzx
+log r2.xyz, |r2.xyzx|
+mul r2.xyz, r2.xyzx, l(6.277395, 6.277395, 6.277395, 0.000000)
+exp r2.xyz, r2.xyzx
+mul r2.xyz, r2.xyzx, l(10000.000000, 10000.000000, 10000.000000, 0.000000)
+div r2.xyz, r2.xyzx, cb0[1].wwww
+movc r2.xyz, r0.yyyy, r2.xyzx, r1.xyzx
+ne r0.x, cb0[1].x, l(0.000000)
+mul r3.xyz, r2.xyzx, cb0[1].yyyy
+eq r4.xy, cb0[1].xxxx, l(1.000000, 2.000000, 0.000000, 0.000000)
+dp3 r5.x, l(0.627404, 0.329283, 0.043313, 0.000000), r2.xyzx
+dp3 r5.y, l(0.069097, 0.919541, 0.011362, 0.000000), r2.xyzx
+dp3 r5.z, l(0.016391, 0.088013, 0.895595, 0.000000), r2.xyzx
+movc r5.xyz, r0.zzzz, r5.xyzx, r2.xyzx
+max r2.w, r5.z, r5.y
+max r2.w, r2.w, r5.x
+lt r3.w, l(0.000000), r2.w
+mad r4.zw, cb0[1].yyyz, r2.wwww, l(0.000000, 0.000000, 1.000000, 1.000000)
+div r2.w, r4.z, r4.w
+mul r6.xyz, r2.wwww, r5.xyzx
+movc r5.xyz, r3.wwww, r6.xyzx, r5.xyzx
+dp3 r6.x, l(1.660496, -0.587656, -0.072840, 0.000000), r5.xyzx
+dp3 r6.y, l(-0.124547, 1.132895, -0.008348, 0.000000), r5.xyzx
+dp3 r6.z, l(-0.018154, -0.100597, 1.118751, 0.000000), r5.xyzx
+movc r5.xyz, r0.zzzz, r6.xyzx, r5.xyzx
+movc r4.yzw, r4.yyyy, r5.xxyz, r2.xxyz
+movc r3.xyz, r4.xxxx, r3.xyzx, r4.yzwy
+movc r2.xyz, r0.xxxx, r3.xyzx, r2.xyzx
+if_nz r0.w
+  ne r0.x, l(0.000000, 0.000000, 0.000000, 0.000000), cb0[0].x
+  if_nz r0.x
+    ge r3.xyz, l(0.040450, 0.040450, 0.040450, 0.000000), r2.xyzx
+    mul r4.xyz, r2.xyzx, l(0.077399, 0.077399, 0.077399, 0.000000)
+    add r5.xyz, r2.xyzx, l(0.055000, 0.055000, 0.055000, 0.000000)
+    mul r5.xyz, |r5.xyzx|, l(0.947867, 0.947867, 0.947867, 0.000000)
+    log r5.xyz, r5.xyzx
+    mul r5.xyz, r5.xyzx, l(2.400000, 2.400000, 2.400000, 0.000000)
+    exp r5.xyz, r5.xyzx
+    movc r2.xyz, r3.xyzx, r4.xyzx, r5.xyzx
+  endif 
+  mul r1.xyz, r2.xyzx, cb0[0].wwww
+else 
+  if_nz r0.z
+    mul r1.xyz, r2.xyzx, cb0[0].wwww
+    ne r0.x, l(0.000000, 0.000000, 0.000000, 0.000000), cb0[0].x
+    if_z r0.x
+      ge r0.xzw, l(0.003131, 0.000000, 0.003131, 0.003131), r1.xxyz
+      mul r3.xyz, r1.xyzx, l(12.920000, 12.920000, 12.920000, 0.000000)
+      log r4.xyz, |r1.xyzx|
+      mul r4.xyz, r4.xyzx, l(0.416667, 0.416667, 0.416667, 0.000000)
+      exp r4.xyz, r4.xyzx
+      mad r4.xyz, r4.xyzx, l(1.055000, 1.055000, 1.055000, 0.000000), l(-0.055000, -0.055000, -0.055000, 0.000000)
+      movc_sat r1.xyz, r0.xzwx, r3.xyzx, r4.xyzx
+    endif 
+  else 
+    if_nz r0.y
+      dp3 r0.x, l(1.660496, -0.587656, -0.072840, 0.000000), r2.xyzx
+      dp3 r0.y, l(-0.124547, 1.132895, -0.008348, 0.000000), r2.xyzx
+      dp3 r0.z, l(-0.018154, -0.100597, 1.118751, 0.000000), r2.xyzx
+      mul r1.xyz, r0.xyzx, cb0[0].wwww
+      ne r0.x, l(0.000000, 0.000000, 0.000000, 0.000000), cb0[0].x
+      if_z r0.x
+        ge r0.xyz, l(0.003131, 0.003131, 0.003131, 0.000000), r1.xyzx
+        mul r3.xyz, r1.xyzx, l(12.920000, 12.920000, 12.920000, 0.000000)
+        log r4.xyz, |r1.xyzx|
+        mul r4.xyz, r4.xyzx, l(0.416667, 0.416667, 0.416667, 0.000000)
+        exp r4.xyz, r4.xyzx
+        mad r4.xyz, r4.xyzx, l(1.055000, 1.055000, 1.055000, 0.000000), l(-0.055000, -0.055000, -0.055000, 0.000000)
+        movc_sat r1.xyz, r0.xyzx, r3.xyzx, r4.xyzx
+      endif 
+    else 
+      mul r1.xyz, r2.xyzx, cb0[0].wwww
+    endif 
+  endif 
+endif 
+mul o0.xyzw, r1.xyzw, v2.xyzw
+ret 
+// Approximately 126 instruction slots used
+#endif
+
+const BYTE g_main[] =
+{
+     68,  88,  66,  67, 154, 200, 
+     28,  25,  30, 140,   0, 183, 
+    251,  32,   6, 185, 210,  29, 
+    251, 110,   1,   0,   0,   0, 
+     64,  20,   0,   0,   5,   0, 
+      0,   0,  52,   0,   0,   0, 
+     80,   4,   0,   0, 196,   4, 
+      0,   0, 248,   4,   0,   0, 
+    164,  19,   0,   0,  82,  68, 
+     69,  70,  20,   4,   0,   0, 
+      1,   0,   0,   0,  12,   1, 
+      0,   0,   5,   0,   0,   0, 
+     60,   0,   0,   0,   0,   5, 
+    255, 255,   0,   1,   0,   0, 
+    233,   3,   0,   0,  82,  68, 
+     49,  49,  60,   0,   0,   0, 
+     24,   0,   0,   0,  32,   0, 
+      0,   0,  40,   0,   0,   0, 
+     36,   0,   0,   0,  12,   0, 
+      0,   0,   0,   0,   0,   0, 
+    220,   0,   0,   0,   3,   0, 
+      0,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
+      1,   0,   0,   0,   1,   0, 
+      0,   0, 229,   0,   0,   0, 
+      2,   0,   0,   0,   5,   0, 
+      0,   0,   4,   0,   0,   0, 
+    255, 255, 255, 255,   0,   0, 
+      0,   0,   1,   0,   0,   0, 
+     13,   0,   0,   0, 238,   0, 
+      0,   0,   2,   0,   0,   0, 
+      5,   0,   0,   0,   4,   0, 
+      0,   0, 255, 255, 255, 255, 
+      1,   0,   0,   0,   1,   0, 
+      0,   0,  13,   0,   0,   0, 
+    247,   0,   0,   0,   2,   0, 
+      0,   0,   5,   0,   0,   0, 
+      4,   0,   0,   0, 255, 255, 
+    255, 255,   2,   0,   0,   0, 
+      1,   0,   0,   0,  13,   0, 
+      0,   0,   0,   1,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
+      0,   0,   1,   0,   0,   0, 
+      1,   0,   0,   0, 115,  97, 
+    109, 112, 108, 101, 114,  48, 
+      0, 116, 101, 120, 116, 117, 
+    114, 101,  48,   0, 116, 101, 
+    120, 116, 117, 114, 101,  49, 
+      0, 116, 101, 120, 116, 117, 
+    114, 101,  50,   0,  67, 111, 
+    110, 115, 116,  97, 110, 116, 
+    115,   0, 171, 171,   0,   1, 
+      0,   0,  12,   0,   0,   0, 
+     36,   1,   0,   0,  96,   0, 
+      0,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0,   4,   3, 
+      0,   0,   0,   0,   0,   0, 
+      4,   0,   0,   0,   2,   0, 
+      0,   0,  24,   3,   0,   0, 
+      0,   0,   0,   0, 255, 255, 
+    255, 255,   0,   0,   0,   0, 
+    255, 255, 255, 255,   0,   0, 
+      0,   0,  60,   3,   0,   0, 
+      4,   0,   0,   0,   4,   0, 
+      0,   0,   2,   0,   0,   0, 
+     24,   3,   0,   0,   0,   0, 
+      0,   0, 255, 255, 255, 255, 
+      0,   0,   0,   0, 255, 255, 
+    255, 255,   0,   0,   0,   0, 
+     73,   3,   0,   0,   8,   0, 
+      0,   0,   4,   0,   0,   0, 
+      2,   0,   0,   0,  24,   3, 
+      0,   0,   0,   0,   0,   0, 
+    255, 255, 255, 255,   0,   0, 
+      0,   0, 255, 255, 255, 255, 
+      0,   0,   0,   0,  84,   3, 
+      0,   0,  12,   0,   0,   0, 
+      4,   0,   0,   0,   2,   0, 
+      0,   0,  24,   3,   0,   0, 
+      0,   0,   0,   0, 255, 255, 
+    255, 255,   0,   0,   0,   0, 
+    255, 255, 255, 255,   0,   0, 
+      0,   0,  96,   3,   0,   0, 
+     16,   0,   0,   0,   4,   0, 
+      0,   0,   2,   0,   0,   0, 
+     24,   3,   0,   0,   0,   0, 
+      0,   0, 255, 255, 255, 255, 
+      0,   0,   0,   0, 255, 255, 
+    255, 255,   0,   0,   0,   0, 
+    111,   3,   0,   0,  20,   0, 
+      0,   0,   4,   0,   0,   0, 
+      2,   0,   0,   0,  24,   3, 
+      0,   0,   0,   0,   0,   0, 
+    255, 255, 255, 255,   0,   0, 
+      0,   0, 255, 255, 255, 255, 
+      0,   0,   0,   0, 127,   3, 
+      0,   0,  24,   0,   0,   0, 
+      4,   0,   0,   0,   2,   0, 
+      0,   0,  24,   3,   0,   0, 
+      0,   0,   0,   0, 255, 255, 
+    255, 255,   0,   0,   0,   0, 
+    255, 255, 255, 255,   0,   0, 
+      0,   0, 143,   3,   0,   0, 
+     28,   0,   0,   0,   4,   0, 
+      0,   0,   2,   0,   0,   0, 
+     24,   3,   0,   0,   0,   0, 
+      0,   0, 255, 255, 255, 255, 
+      0,   0,   0,   0, 255, 255, 
+    255, 255,   0,   0,   0,   0, 
+    159,   3,   0,   0,  32,   0, 
+      0,   0,  16,   0,   0,   0, 
+      2,   0,   0,   0, 176,   3, 
+      0,   0,   0,   0,   0,   0, 
+    255, 255, 255, 255,   0,   0, 
+      0,   0, 255, 255, 255, 255, 
+      0,   0,   0,   0, 212,   3, 
+      0,   0,  48,   0,   0,   0, 
+     16,   0,   0,   0,   2,   0, 
+      0,   0, 176,   3,   0,   0, 
+      0,   0,   0,   0, 255, 255, 
+    255, 255,   0,   0,   0,   0, 
+    255, 255, 255, 255,   0,   0, 
+      0,   0, 219,   3,   0,   0, 
+     64,   0,   0,   0,  16,   0, 
+      0,   0,   2,   0,   0,   0, 
+    176,   3,   0,   0,   0,   0, 
+      0,   0, 255, 255, 255, 255, 
+      0,   0,   0,   0, 255, 255, 
+    255, 255,   0,   0,   0,   0, 
+    226,   3,   0,   0,  80,   0, 
+      0,   0,  16,   0,   0,   0, 
+      2,   0,   0,   0, 176,   3, 
+      0,   0,   0,   0,   0,   0, 
+    255, 255, 255, 255,   0,   0, 
+      0,   0, 255, 255, 255, 255, 
+      0,   0,   0,   0, 115,  99, 
+     82,  71,  66,  95, 111, 117, 
+    116, 112, 117, 116,   0, 102, 
+    108, 111,  97, 116,   0, 171, 
+      0,   0,   3,   0,   1,   0, 
+      1,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
+      0,   0,  17,   3,   0,   0, 
+    116, 101, 120, 116, 117, 114, 
+    101,  95, 116, 121, 112, 101, 
+      0, 105, 110, 112, 117, 116, 
+     95, 116, 121, 112, 101,   0, 
+     99, 111, 108, 111, 114,  95, 
+    115,  99,  97, 108, 101,   0, 
+    116, 111, 110, 101, 109,  97, 
+    112,  95, 109, 101, 116, 104, 
+    111, 100,   0, 116, 111, 110, 
+    101, 109,  97, 112,  95, 102, 
+     97,  99, 116, 111, 114,  49, 
+      0, 116, 111, 110, 101, 109, 
+     97, 112,  95, 102,  97,  99, 
+    116, 111, 114,  50,   0, 115, 
+    100, 114,  95, 119, 104, 105, 
+    116, 101,  95, 112, 111, 105, 
+    110, 116,   0,  89, 111, 102, 
+    102, 115, 101, 116,   0, 102, 
+    108, 111,  97, 116,  52,   0, 
+    171, 171,   1,   0,   3,   0, 
+      1,   0,   4,   0,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0, 167,   3, 
+      0,   0,  82,  99, 111, 101, 
+    102, 102,   0,  71,  99, 111, 
+    101, 102, 102,   0,  66,  99, 
+    111, 101, 102, 102,   0,  77, 
+    105,  99, 114, 111, 115, 111, 
+    102, 116,  32,  40,  82,  41, 
+     32,  72,  76,  83,  76,  32, 
+     83, 104,  97, 100, 101, 114, 
+     32,  67, 111, 109, 112, 105, 
+    108, 101, 114,  32,  49,  48, 
+     46,  49,   0, 171, 171, 171, 
+     73,  83,  71,  78, 108,   0, 
+      0,   0,   3,   0,   0,   0, 
+      8,   0,   0,   0,  80,   0, 
+      0,   0,   0,   0,   0,   0, 
+      1,   0,   0,   0,   3,   0, 
+      0,   0,   0,   0,   0,   0, 
+     15,   0,   0,   0,  92,   0, 
+      0,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0,   3,   0, 
+      0,   0,   1,   0,   0,   0, 
+      3,   3,   0,   0, 101,   0, 
+      0,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0,   3,   0, 
+      0,   0,   2,   0,   0,   0, 
+     15,  15,   0,   0,  83,  86, 
+     95,  80,  79,  83,  73,  84, 
+     73,  79,  78,   0,  84,  69, 
+     88,  67,  79,  79,  82,  68, 
+      0,  67,  79,  76,  79,  82, 
+      0, 171,  79,  83,  71,  78, 
+     44,   0,   0,   0,   1,   0, 
+      0,   0,   8,   0,   0,   0, 
+     32,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
+      3,   0,   0,   0,   0,   0, 
+      0,   0,  15,   0,   0,   0, 
+     83,  86,  95,  84,  65,  82, 
+     71,  69,  84,   0, 171, 171, 
+     83,  72,  69,  88, 164,  14, 
+      0,   0,  80,   0,   0,   0, 
+    169,   3,   0,   0, 106,   8, 
+      0,   1,  89,   0,   0,   4, 
+     70, 142,  32,   0,   0,   0, 
+      0,   0,   6,   0,   0,   0, 
+     90,   0,   0,   3,   0,  96, 
+     16,   0,   0,   0,   0,   0, 
+     88,  24,   0,   4,   0, 112, 
+     16,   0,   0,   0,   0,   0, 
+     85,  85,   0,   0,  88,  24, 
+      0,   4,   0, 112,  16,   0, 
+      1,   0,   0,   0,  85,  85, 
+      0,   0,  88,  24,   0,   4, 
+      0, 112,  16,   0,   2,   0, 
+      0,   0,  85,  85,   0,   0, 
+     98,  16,   0,   3,  50,  16, 
+     16,   0,   1,   0,   0,   0, 
+     98,  16,   0,   3, 242,  16, 
+     16,   0,   2,   0,   0,   0, 
+    101,   0,   0,   3, 242,  32, 
+     16,   0,   0,   0,   0,   0, 
+    104,   0,   0,   2,   7,   0, 
+      0,   0,  24,   0,   0,  11, 
+    242,   0,  16,   0,   0,   0, 
+      0,   0, 150, 138,  32,   0, 
+      0,   0,   0,   0,   0,   0, 
+      0,   0,   2,  64,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
+     64,  64,   0,   0,   0,  64, 
+      0,   0, 128,  63,  31,   0, 
+      4,   3,  10,   0,  16,   0, 
+      0,   0,   0,   0,  54,   0, 
+      0,   8, 242,   0,  16,   0, 
+      1,   0,   0,   0,   2,  64, 
+      0,   0,   0,   0, 128,  63, 
+      0,   0, 128,  63,   0,   0, 
+    128,  63,   0,   0, 128,  63, 
+     18,   0,   0,   1,  24,   0, 
+      0,   8,  18,   0,  16,   0, 
+      0,   0,   0,   0,  26, 128, 
+     32,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0,   1,  64, 
+      0,   0,   0,   0, 128,  63, 
+     31,   0,   4,   3,  10,   0, 
+     16,   0,   0,   0,   0,   0, 
+     69,   0,   0, 139, 194,   0, 
+      0, 128,  67,  85,  21,   0, 
+    242,   0,  16,   0,   1,   0, 
+      0,   0,  70,  16,  16,   0, 
+      1,   0,   0,   0,  70, 126, 
+     16,   0,   0,   0,   0,   0, 
+      0,  96,  16,   0,   0,   0, 
+      0,   0,  18,   0,   0,   1, 
+     24,   0,   0,   8,  18,   0, 
+     16,   0,   0,   0,   0,   0, 
+     26, 128,  32,   0,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
+      1,  64,   0,   0,   0,   0, 
+      0,  64,  31,   0,   4,   3, 
+     10,   0,  16,   0,   0,   0, 
+      0,   0,  69,   0,   0, 139, 
+    194,   0,   0, 128,  67,  85, 
+     21,   0,  18,   0,  16,   0, 
+      2,   0,   0,   0,  70,  16, 
+     16,   0,   1,   0,   0,   0, 
+     70, 126,  16,   0,   0,   0, 
+      0,   0,   0,  96,  16,   0, 
+      0,   0,   0,   0,  69,   0, 
+      0, 139, 194,   0,   0, 128, 
+     67,  85,  21,   0,  98,   0, 
+     16,   0,   2,   0,   0,   0, 
+     70,  16,  16,   0,   1,   0, 
+      0,   0,  38, 125,  16,   0, 
+      1,   0,   0,   0,   0,  96, 
+     16,   0,   0,   0,   0,   0, 
+      0,   0,   0,   8, 114,   0, 
+     16,   0,   2,   0,   0,   0, 
+     70,   2,  16,   0,   2,   0, 
+      0,   0,  70, 130,  32,   0, 
+      0,   0,   0,   0,   2,   0, 
+      0,   0,  16,   0,   0,   8, 
+     18,   0,  16,   0,   1,   0, 
+      0,   0,  70,   2,  16,   0, 
+      2,   0,   0,   0,  70, 130, 
+     32,   0,   0,   0,   0,   0, 
+      3,   0,   0,   0,  16,   0, 
+      0,   8,  34,   0,  16,   0, 
+      1,   0,   0,   0,  70,   2, 
+     16,   0,   2,   0,   0,   0, 
+     70, 130,  32,   0,   0,   0, 
+      0,   0,   4,   0,   0,   0, 
+     16,   0,   0,   8,  66,   0, 
+     16,   0,   1,   0,   0,   0, 
+     70,   2,  16,   0,   2,   0, 
+      0,   0,  70, 130,  32,   0, 
+      0,   0,   0,   0,   5,   0, 
+      0,   0,  18,   0,   0,   1, 
+     24,   0,   0,   8,  18,   0, 
+     16,   0,   0,   0,   0,   0, 
+     26, 128,  32,   0,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
+      1,  64,   0,   0,   0,   0, 
+     64,  64,  31,   0,   4,   3, 
+     10,   0,  16,   0,   0,   0, 
+      0,   0,  69,   0,   0, 139, 
+    194,   0,   0, 128,  67,  85, 
+     21,   0,  18,   0,  16,   0, 
+      2,   0,   0,   0,  70,  16, 
+     16,   0,   1,   0,   0,   0, 
+     70, 126,  16,   0,   0,   0, 
+      0,   0,   0,  96,  16,   0, 
+      0,   0,   0,   0,  69,   0, 
+      0, 139, 194,   0,   0, 128, 
+     67,  85,  21,   0,  98,   0, 
+     16,   0,   2,   0,   0,   0, 
+     70,  16,  16,   0,   1,   0, 
+      0,   0, 102, 124,  16,   0, 
+      1,   0,   0,   0,   0,  96, 
+     16,   0,   0,   0,   0,   0, 
+      0,   0,   0,   8, 114,   0, 
+     16,   0,   2,   0,   0,   0, 
+     70,   2,  16,   0,   2,   0, 
+      0,   0,  70, 130,  32,   0, 
+      0,   0,   0,   0,   2,   0, 
+      0,   0,  16,   0,   0,   8, 
+     18,   0,  16,   0,   1,   0, 
+      0,   0,  70,   2,  16,   0, 
+      2,   0,   0,   0,  70, 130, 
+     32,   0,   0,   0,   0,   0, 
+      3,   0,   0,   0,  16,   0, 
+      0,   8,  34,   0,  16,   0, 
+      1,   0,   0,   0,  70,   2, 
+     16,   0,   2,   0,   0,   0, 
+     70, 130,  32,   0,   0,   0, 
+      0,   0,   4,   0,   0,   0, 
+     16,   0,   0,   8,  66,   0, 
+     16,   0,   1,   0,   0,   0, 
+     70,   2,  16,   0,   2,   0, 
+      0,   0,  70, 130,  32,   0, 
+      0,   0,   0,   0,   5,   0, 
+      0,   0,  18,   0,   0,   1, 
+     24,   0,   0,   8,  18,   0, 
+     16,   0,   0,   0,   0,   0, 
+     26, 128,  32,   0,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
+      1,  64,   0,   0,   0,   0, 
+    128,  64,  31,   0,   4,   3, 
+     10,   0,  16,   0,   0,   0, 
+      0,   0,  69,   0,   0, 139, 
+    194,   0,   0, 128,  67,  85, 
+     21,   0,  18,   0,  16,   0, 
+      2,   0,   0,   0,  70,  16, 
+     16,   0,   1,   0,   0,   0, 
+     70, 126,  16,   0,   0,   0, 
+      0,   0,   0,  96,  16,   0, 
+      0,   0,   0,   0,  69,   0, 
+      0, 139, 194,   0,   0, 128, 
+     67,  85,  21,   0,  34,   0, 
+     16,   0,   2,   0,   0,   0, 
+     70,  16,  16,   0,   1,   0, 
+      0,   0,  22, 126,  16,   0, 
+      1,   0,   0,   0,   0,  96, 
+     16,   0,   0,   0,   0,   0, 
+     69,   0,   0, 139, 194,   0, 
+      0, 128,  67,  85,  21,   0, 
+     66,   0,  16,   0,   2,   0, 
+      0,   0,  70,  16,  16,   0, 
+      1,   0,   0,   0, 150, 124, 
+     16,   0,   2,   0,   0,   0, 
+      0,  96,  16,   0,   0,   0, 
+      0,   0,   0,   0,   0,   8, 
+    114,   0,  16,   0,   2,   0, 
+      0,   0,  70,   2,  16,   0, 
+      2,   0,   0,   0,  70, 130, 
+     32,   0,   0,   0,   0,   0, 
+      2,   0,   0,   0,  16,   0, 
+      0,   8,  18,   0,  16,   0, 
+      1,   0,   0,   0,  70,   2, 
+     16,   0,   2,   0,   0,   0, 
+     70, 130,  32,   0,   0,   0, 
+      0,   0,   3,   0,   0,   0, 
+     16,   0,   0,   8,  34,   0, 
+     16,   0,   1,   0,   0,   0, 
+     70,   2,  16,   0,   2,   0, 
+      0,   0,  70, 130,  32,   0, 
+      0,   0,   0,   0,   4,   0, 
+      0,   0,  16,   0,   0,   8, 
+     66,   0,  16,   0,   1,   0, 
+      0,   0,  70,   2,  16,   0, 
+      2,   0,   0,   0,  70, 130, 
+     32,   0,   0,   0,   0,   0, 
+      5,   0,   0,   0,  18,   0, 
+      0,   1,  54,   0,   0,   8, 
+    114,   0,  16,   0,   1,   0, 
+      0,   0,   2,  64,   0,   0, 
+      0,   0, 128,  63,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0,  21,   0, 
+      0,   1,  21,   0,   0,   1, 
+     21,   0,   0,   1,  54,   0, 
+      0,   5, 130,   0,  16,   0, 
+      1,   0,   0,   0,   1,  64, 
+      0,   0,   0,   0, 128,  63, 
+     21,   0,   0,   1,  21,   0, 
+      0,   1,  47,   0,   0,   6, 
+    114,   0,  16,   0,   2,   0, 
+      0,   0,  70,   2,  16, 128, 
+    129,   0,   0,   0,   1,   0, 
+      0,   0,  56,   0,   0,  10, 
+    114,   0,  16,   0,   2,   0, 
+      0,   0,  70,   2,  16,   0, 
+      2,   0,   0,   0,   2,  64, 
+      0,   0, 172, 205,  79,  60, 
+    172, 205,  79,  60, 172, 205, 
+     79,  60,   0,   0,   0,   0, 
+     25,   0,   0,   5, 114,   0, 
+     16,   0,   2,   0,   0,   0, 
+     70,   2,  16,   0,   2,   0, 
+      0,   0,   0,   0,   0,  10, 
+    114,   0,  16,   0,   3,   0, 
+      0,   0,  70,   2,  16,   0, 
+      2,   0,   0,   0,   2,  64, 
+      0,   0, 

(Patch may be truncated, please check the link at the top of this post.)