[libpng16] Conditionally compile ARM_NEON headers in pngpriv.h

Updated contrib/intel/intel_sse.patch
diff --git a/ANNOUNCE b/ANNOUNCE
index 97b770e..6a75c08 100644
--- a/ANNOUNCE
+++ b/ANNOUNCE
@@ -1,4 +1,4 @@
-Libpng 1.6.24rc03 - August 1, 2016
+Libpng 1.6.24rc03 - August 2, 2016
 
 This is not intended to be a public release.  It will be replaced
 within a few weeks by a public version or by another test version.
@@ -97,7 +97,9 @@
   Conditionally compile SSE2 headers in contrib/intel/intel_sse.patch
   Conditionally compile png_decompress_chunk().
 
-Version 1.6.24rc03 [August 1, 2016]
+Version 1.6.24rc03 [August 2, 2016]
+  Conditionally compile ARM_NEON headers in pngpriv.h
+  Updated contrib/intel/intel_sse.patch
 
 Send comments/corrections/commendations to png-mng-implement at lists.sf.net
 (subscription required; visit
diff --git a/CHANGES b/CHANGES
index 5fce810..ffbde4f 100644
--- a/CHANGES
+++ b/CHANGES
@@ -5668,7 +5668,9 @@
   Conditionally compile SSE2 headers in contrib/intel/intel_sse.patch
   Conditionally compile png_decompress_chunk().
 
-Version 1.6.24rc03 [August 1, 2016]
+Version 1.6.24rc03 [August 2, 2016]
+  Conditionally compile ARM_NEON headers in pngpriv.h
+  Updated contrib/intel/intel_sse.patch
 
 Send comments/corrections/commendations to png-mng-implement at lists.sf.net
 (subscription required; visit
diff --git a/contrib/intel/intel_sse.patch b/contrib/intel/intel_sse.patch
index 2f31a06..c5579e3 100644
--- a/contrib/intel/intel_sse.patch
+++ b/contrib/intel/intel_sse.patch
@@ -77,8 +77,8 @@
  #   Versioned symbols and restricted exports
  if HAVE_SOLARIS_LD
 diff --git a/pngpriv.h b/pngpriv.h
---- a/pngpriv.h	2016-07-25 07:49:33.000000000 -0500
-+++ b/pngpriv.h	2016-07-31 21:07:24.040395258 -0500
+--- a/pngpriv.h	2016-08-01 18:13:38.770128810 -0500
++++ b/pngpriv.h	2016-08-01 18:50:19.130179017 -0500
 @@ -177,16 +177,52 @@
  #  endif /* !PNG_ARM_NEON_IMPLEMENTATION */
  
@@ -132,7 +132,7 @@
   * PNG_BUILD_DLL must not be set.  To avoid the code below kicking in build a
   * static library of libpng then link the DLL against that.
   */
-@@ -1184,16 +1220,31 @@ PNG_INTERNAL_FUNCTION(void,png_read_filt
+@@ -1185,16 +1221,31 @@ PNG_INTERNAL_FUNCTION(void,png_read_filt
      row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
  PNG_INTERNAL_FUNCTION(void,png_read_filter_row_avg4_neon,(png_row_infop
      row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
@@ -140,7 +140,8 @@
      row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
  PNG_INTERNAL_FUNCTION(void,png_read_filter_row_paeth4_neon,(png_row_infop
      row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
- 
+ #endif
++ 
 +#if PNG_INTEL_SSE_IMPLEMENTATION > 0
 +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_sub3_sse2,(png_row_infop
 +    row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
@@ -155,7 +156,7 @@
 +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_paeth4_sse2,(png_row_infop
 +    row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
 +#endif
-+
+ 
  /* Choose the best filter to use and filter the row data */
  PNG_INTERNAL_FUNCTION(void,png_write_find_filter,(png_structrp png_ptr,
      png_row_infop row_info),PNG_EMPTY);
@@ -163,16 +164,15 @@
  #ifdef PNG_SEQUENTIAL_READ_SUPPORTED
  PNG_INTERNAL_FUNCTION(void,png_read_IDAT_data,(png_structrp png_ptr,
     png_bytep output, png_alloc_size_t avail_out),PNG_EMPTY);
-    /* Read 'avail_out' bytes of data from the IDAT stream.  If the output buffer
-@@ -1910,16 +1961,20 @@ PNG_INTERNAL_FUNCTION(void, PNG_FILTER_O
-    /* Just declare the optimization that will be used */
- #else
+@@ -1914,16 +1965,20 @@ PNG_INTERNAL_FUNCTION(void, PNG_FILTER_O
     /* List *all* the possible optimizations here - this branch is required if
      * the builder of libpng passes the definition of PNG_FILTER_OPTIMIZATIONS in
      * CFLAGS in place of CPPFLAGS *and* uses symbol prefixing.
      */
+ #  if PNG_ARM_NEON_OPT > 0
  PNG_INTERNAL_FUNCTION(void, png_init_filter_functions_neon,
     (png_structp png_ptr, unsigned int bpp), PNG_EMPTY);
+ #  endif
 +#  if PNG_INTEL_SSE_IMPLEMENTATION > 0
 +PNG_INTERNAL_FUNCTION(void, png_init_filter_functions_sse2,
 +   (png_structp png_ptr, unsigned int bpp), PNG_EMPTY);
diff --git a/pngpriv.h b/pngpriv.h
index fbd9588..3a81a3b 100644
--- a/pngpriv.h
+++ b/pngpriv.h
@@ -1174,6 +1174,7 @@
 PNG_INTERNAL_FUNCTION(void,png_read_filter_row,(png_structrp pp, png_row_infop
     row_info, png_bytep row, png_const_bytep prev_row, int filter),PNG_EMPTY);
 
+#if PNG_ARM_NEON_OPT > 0
 PNG_INTERNAL_FUNCTION(void,png_read_filter_row_up_neon,(png_row_infop row_info,
     png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
 PNG_INTERNAL_FUNCTION(void,png_read_filter_row_sub3_neon,(png_row_infop
@@ -1188,6 +1189,7 @@
     row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
 PNG_INTERNAL_FUNCTION(void,png_read_filter_row_paeth4_neon,(png_row_infop
     row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
+#endif
 
 /* Choose the best filter to use and filter the row data */
 PNG_INTERNAL_FUNCTION(void,png_write_find_filter,(png_structrp png_ptr,
@@ -1913,8 +1915,10 @@
     * the builder of libpng passes the definition of PNG_FILTER_OPTIMIZATIONS in
     * CFLAGS in place of CPPFLAGS *and* uses symbol prefixing.
     */
+#  if PNG_ARM_NEON_OPT > 0
 PNG_INTERNAL_FUNCTION(void, png_init_filter_functions_neon,
    (png_structp png_ptr, unsigned int bpp), PNG_EMPTY);
+#  endif
 #endif
 
 PNG_INTERNAL_FUNCTION(png_uint_32, png_check_keyword, (png_structrp png_ptr,