[FFmpeg-cvslog] png: make ff_png_pass_mask local to pngdec.

Clément Bœsch git at videolan.org
Thu Mar 22 23:04:28 CET 2012


ffmpeg | branch: master | Clément Bœsch <ubitux at gmail.com> | Thu Mar 22 22:52:55 2012 +0100| [50a3867bab1762b98339d9ef9cafd05b4b3bcced] | committer: Clément Bœsch

png: make ff_png_pass_mask local to pngdec.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=50a3867bab1762b98339d9ef9cafd05b4b3bcced
---

 libavcodec/png.c    |    5 -----
 libavcodec/png.h    |    3 ---
 libavcodec/pngdec.c |    7 ++++++-
 3 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/libavcodec/png.c b/libavcodec/png.c
index ecca31e..332701c 100644
--- a/libavcodec/png.c
+++ b/libavcodec/png.c
@@ -39,11 +39,6 @@ static const uint8_t ff_png_pass_xshift[NB_PASSES] = {
     3, 3, 2, 2, 1, 1, 0
 };
 
-/* Mask to determine which pixels are valid in a pass */
-const uint8_t ff_png_pass_mask[NB_PASSES] = {
-    0x01, 0x01, 0x11, 0x11, 0x55, 0x55, 0xff,
-};
-
 void *ff_png_zalloc(void *opaque, unsigned int items, unsigned int size)
 {
     if(items >= UINT_MAX / size)
diff --git a/libavcodec/png.h b/libavcodec/png.h
index bab5224..4b30ba3 100644
--- a/libavcodec/png.h
+++ b/libavcodec/png.h
@@ -55,9 +55,6 @@ extern const uint8_t ff_mngsig[8];
 /* Mask to determine which y pixels are valid in a pass */
 extern const uint8_t ff_png_pass_ymask[NB_PASSES];
 
-/* Mask to determine which pixels are valid in a pass */
-extern const uint8_t ff_png_pass_mask[NB_PASSES];
-
 void *ff_png_zalloc(void *opaque, unsigned int items, unsigned int size);
 
 void ff_png_zfree(void *opaque, void *ptr);
diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
index 8901874..dd1f56b 100644
--- a/libavcodec/pngdec.c
+++ b/libavcodec/pngdec.c
@@ -67,6 +67,11 @@ typedef struct PNGDecContext {
     z_stream zstream;
 } PNGDecContext;
 
+/* Mask to determine which pixels are valid in a pass */
+static const uint8_t png_pass_mask[NB_PASSES] = {
+    0x01, 0x01, 0x11, 0x11, 0x55, 0x55, 0xff,
+};
+
 /* Mask to determine which y pixels can be written in a pass */
 static const uint8_t png_pass_dsp_ymask[NB_PASSES] = {
     0xff, 0xff, 0x0f, 0xff, 0x33, 0xff, 0x55,
@@ -88,7 +93,7 @@ static void png_put_interlaced_row(uint8_t *dst, int width,
     uint8_t *d;
     const uint8_t *s;
 
-    mask = ff_png_pass_mask[pass];
+    mask = png_pass_mask[pass];
     dsp_mask = png_pass_dsp_mask[pass];
     switch(bits_per_pixel) {
     case 1:



More information about the ffmpeg-cvslog mailing list