Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/mpc-hc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/thirdparty/libpng/pngtrans.c')
-rw-r--r--src/thirdparty/libpng/pngtrans.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/thirdparty/libpng/pngtrans.c b/src/thirdparty/libpng/pngtrans.c
index 6a76095af..53d9a25b9 100644
--- a/src/thirdparty/libpng/pngtrans.c
+++ b/src/thirdparty/libpng/pngtrans.c
@@ -1,7 +1,7 @@
/* pngtrans.c - transforms the data in a row (used by both readers and writers)
*
- * Last changed in libpng 1.5.2 [March 31, 2011]
+ * Last changed in libpng 1.5.4 [July 7, 2011]
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@@ -442,7 +442,11 @@ png_do_strip_channel(png_row_infop row_info, png_bytep row, int at_start)
/* At the start sp will point to the first byte to copy and dp to where
* it is copied to. ep always points just beyond the end of the row, so
* the loop simply copies (channels-1) channels until sp reaches ep.
+ *
+ * at_start: 0 -- convert AG, XG, ARGB, XRGB, AAGG, XXGG, etc.
+ * nonzero -- convert GA, GX, RGBA, RGBX, GGAA, RRGGBBXX, etc.
*/
+
/* GA, GX, XG cases */
if (row_info->channels == 2)
{
@@ -450,7 +454,7 @@ png_do_strip_channel(png_row_infop row_info, png_bytep row, int at_start)
{
if (at_start) /* Skip initial filler */
++sp;
- else /* Skip initial channels and, for sp, the filler */
+ else /* Skip initial channel and, for sp, the filler */
sp += 2, ++dp;
/* For a 1 pixel wide image there is nothing to do */
@@ -462,9 +466,9 @@ png_do_strip_channel(png_row_infop row_info, png_bytep row, int at_start)
else if (row_info->bit_depth == 16)
{
- if (at_start)
+ if (at_start) /* Skip initial filler */
sp += 2;
- else
+ else /* Skip initial channel and, for sp, the filler */
sp += 4, dp += 2;
while (sp < ep)
@@ -502,9 +506,9 @@ png_do_strip_channel(png_row_infop row_info, png_bytep row, int at_start)
else if (row_info->bit_depth == 16)
{
- if (at_start)
+ if (at_start) /* Skip initial filler */
sp += 2;
- else
+ else /* Skip initial channels and, for sp, the filler */
sp += 8, dp += 6;
while (sp < ep)