DO NOT MERGE Update libpng to 1.6.20

BUG:23265085
Change-Id: I85199805636d771f3597b691b63bc0bf46084833
(cherry picked from commit bbe98b40cda082024b669fa508931042eed18f82)

get_pixel(png_uint_32 format))(Pixel *p, png_const_voidp pb)
{
 /* The color-map flag is irrelevant here - the caller of the function
    * returned must either pass the buffer or, for a color-mapped image, the
    * correct entry in the color-map.
    */
 if (format & PNG_FORMAT_FLAG_LINEAR)
 {
 if (format & PNG_FORMAT_FLAG_COLOR)
 {
#        ifdef PNG_FORMAT_BGR_SUPPORTED
 if (format & PNG_FORMAT_FLAG_BGR)
 {
 if (format & PNG_FORMAT_FLAG_ALPHA)
 {
#                 ifdef PNG_FORMAT_AFIRST_SUPPORTED
 if (format & PNG_FORMAT_FLAG_AFIRST)
 return gp_abgr16;

 else
#                 endif
 return gp_bgra16;
 }

 else
 return gp_bgr16;
 }

 else
#        endif
 {
 if (format & PNG_FORMAT_FLAG_ALPHA)
 {
#              ifdef PNG_FORMAT_AFIRST_SUPPORTED
 if (format & PNG_FORMAT_FLAG_AFIRST)
 return gp_argb16;

 else
#              endif
 return gp_rgba16;
 }

 else
 return gp_rgb16;
 }
 }

 else
 {
 if (format & PNG_FORMAT_FLAG_ALPHA)
 {
#           ifdef PNG_FORMAT_AFIRST_SUPPORTED
 if (format & PNG_FORMAT_FLAG_AFIRST)
 return gp_ag16;

 else
#           endif
 return gp_ga16;
 }

 else
 return gp_g16;
 }
 }

 else
 {
 if (format & PNG_FORMAT_FLAG_COLOR)
 {
#        ifdef PNG_FORMAT_BGR_SUPPORTED
 if (format & PNG_FORMAT_FLAG_BGR)
 {
 if (format & PNG_FORMAT_FLAG_ALPHA)
 {
#                 ifdef PNG_FORMAT_AFIRST_SUPPORTED
 if (format & PNG_FORMAT_FLAG_AFIRST)
 return gp_abgr8;

 else
#                 endif
 return gp_bgra8;
 }

 else
 return gp_bgr8;
 }

 else
#        endif
 {
 if (format & PNG_FORMAT_FLAG_ALPHA)
 {
#              ifdef PNG_FORMAT_AFIRST_SUPPORTED
 if (format & PNG_FORMAT_FLAG_AFIRST)
 return gp_argb8;

 else
#              endif
 return gp_rgba8;
 }

 else
 return gp_rgb8;
 }
 }

 else
 {
 if (format & PNG_FORMAT_FLAG_ALPHA)
 {
#           ifdef PNG_FORMAT_AFIRST_SUPPORTED
 if (format & PNG_FORMAT_FLAG_AFIRST)
 return gp_ag8;

 else
#           endif
 return gp_ga8;
 }

 else
 return gp_g8;
 }
 }
}

get_pixel(png_uint_32 format))(Pixel *p, png_const_voidp pb)
{
 /* The color-map flag is irrelevant here - the caller of the function
    * returned must either pass the buffer or, for a color-mapped image, the
    * correct entry in the color-map.
    */
 if (format & PNG_FORMAT_FLAG_LINEAR)
 {
 if (format & PNG_FORMAT_FLAG_COLOR)
 {
#        ifdef PNG_FORMAT_BGR_SUPPORTED
 if (format & PNG_FORMAT_FLAG_BGR)
 {
 if (format & PNG_FORMAT_FLAG_ALPHA)
 {
#                 ifdef PNG_FORMAT_AFIRST_SUPPORTED
 if (format & PNG_FORMAT_FLAG_AFIRST)
 return gp_abgr16;

 else
#                 endif
 return gp_bgra16;
 }

 else
 return gp_bgr16;
 }

 else
#        endif
 {
 if (format & PNG_FORMAT_FLAG_ALPHA)
 {
#              ifdef PNG_FORMAT_AFIRST_SUPPORTED
 if (format & PNG_FORMAT_FLAG_AFIRST)
 return gp_argb16;

 else
#              endif
 return gp_rgba16;
 }

 else
 return gp_rgb16;
 }
 }

 else
 {
 if (format & PNG_FORMAT_FLAG_ALPHA)
 {
#           ifdef PNG_FORMAT_AFIRST_SUPPORTED
 if (format & PNG_FORMAT_FLAG_AFIRST)
 return gp_ag16;

 else
#           endif
 return gp_ga16;
 }

 else
 return gp_g16;
 }
 }

 else
 {
 if (format & PNG_FORMAT_FLAG_COLOR)
 {
#        ifdef PNG_FORMAT_BGR_SUPPORTED
 if (format & PNG_FORMAT_FLAG_BGR)
 {
 if (format & PNG_FORMAT_FLAG_ALPHA)
 {
#                 ifdef PNG_FORMAT_AFIRST_SUPPORTED
 if (format & PNG_FORMAT_FLAG_AFIRST)
 return gp_abgr8;

 else
#                 endif
 return gp_bgra8;
 }

 else
 return gp_bgr8;
 }

 else
#        endif
 {
 if (format & PNG_FORMAT_FLAG_ALPHA)
 {
#              ifdef PNG_FORMAT_AFIRST_SUPPORTED
 if (format & PNG_FORMAT_FLAG_AFIRST)
 return gp_argb8;

 else
#              endif
 return gp_rgba8;
 }

 else
 return gp_rgb8;
 }
 }

 else
 {
 if (format & PNG_FORMAT_FLAG_ALPHA)
 {
#           ifdef PNG_FORMAT_AFIRST_SUPPORTED
 if (format & PNG_FORMAT_FLAG_AFIRST)
 return gp_ag8;

 else
#           endif
 return gp_ga8;
 }

 else
 return gp_g8;
 }
 }
}
