PageRenderTime 65ms CodeModel.GetById 13ms app.highlight 45ms RepoModel.GetById 1ms app.codeStats 1ms

/src/FreeImage/Source/LibMNG/libmng_pixels.h

https://bitbucket.org/cabalistic/ogredeps/
C++ Header | 1147 lines | 881 code | 62 blank | 204 comment | 1 complexity | 2cc989fb67b6b5cc96c1f1af4fe40e89 MD5 | raw file

Large files files are truncated, but you can click here to view the full file

  1/* ************************************************************************** */
  2/* *             For conditions of distribution and use,                    * */
  3/* *                see copyright notice in libmng.h                        * */
  4/* ************************************************************************** */
  5/* *                                                                        * */
  6/* * project   : libmng                                                     * */
  7/* * file      : libmng_pixels.h           copyright (c) 2000-2006 G.Juyn   * */
  8/* * version   : 1.0.10                                                     * */
  9/* *                                                                        * */
 10/* * purpose   : Pixel-row management routines (definition)                 * */
 11/* *                                                                        * */
 12/* * author    : G.Juyn                                                     * */
 13/* *                                                                        * */
 14/* * comment   : Definition of the pixel-row management routines            * */
 15/* *                                                                        * */
 16/* * changes   : 0.5.1 - 05/08/2000 - G.Juyn                                * */
 17/* *             - changed strict-ANSI stuff                                * */
 18/* *                                                                        * */
 19/* *             0.5.2 - 05/22/2000 - G.Juyn                                * */
 20/* *             - added some JNG definitions                               * */
 21/* *             - added delta-image row-processing routines                * */
 22/* *             0.5.2 - 06/05/2000 - G.Juyn                                * */
 23/* *             - added support for RGB8_A8 canvasstyle                    * */
 24/* *                                                                        * */
 25/* *             0.5.3 - 06/16/2000 - G.Juyn                                * */
 26/* *             - changed progressive-display processing                   * */
 27/* *                                                                        * */
 28/* *             0.9.2 - 08/05/2000 - G.Juyn                                * */
 29/* *             - changed file-prefixes                                    * */
 30/* *                                                                        * */
 31/* *             0.9.3 - 08/26/2000 - G.Juyn                                * */
 32/* *             - added MAGN support                                       * */
 33/* *             0.9.3 - 09/07/2000 - G.Juyn                                * */
 34/* *             - added support for new filter_types                       * */
 35/* *             0.9.3 - 10/16/2000 - G.Juyn                                * */
 36/* *             - added optional support for bKGD for PNG images           * */
 37/* *             - added support for JDAA                                   * */
 38/* *             0.9.3 - 10/19/2000 - G.Juyn                                * */
 39/* *             - implemented delayed delta-processing                     * */
 40/* *                                                                        * */
 41/* *             0.9.4 -  1/18/2001 - G.Juyn                                * */
 42/* *             - added "new" MAGN methods 3, 4 & 5                        * */
 43/* *                                                                        * */
 44/* *             1.0.1 - 04/21/2001 - G.Juyn (code by G.Kelly)              * */
 45/* *             - added BGRA8 canvas with premultiplied alpha              * */
 46/* *                                                                        * */
 47/* *             1.0.5 - 08/15/2002 - G.Juyn                                * */
 48/* *             - completed PROM support                                   * */
 49/* *             - completed delta-image support                            * */
 50/* *             1.0.5 - 08/16/2002 - G.Juyn                                * */
 51/* *             - completed MAGN support (16-bit functions)                * */
 52/* *             1.0.5 - 08/19/2002 - G.Juyn                                * */
 53/* *             - B597134 - libmng pollutes the linker namespace           * */
 54/* *             1.0.5 - 09/22/2002 - G.Juyn                                * */
 55/* *             - added bgrx8 canvas (filler byte)                         * */
 56/* *             1.0.5 - 09/23/2002 - G.Juyn                                * */
 57/* *             - added compose over/under routines for PAST processing    * */
 58/* *             - added flip & tile routines for PAST processing           * */
 59/* *                                                                        * */
 60/* *             1.0.6 - 03/09/2003 - G.Juyn                                * */
 61/* *             - hiding 12-bit JPEG stuff                                 * */
 62/* *             1.0.6 - 05/11/2003 - G. Juyn                               * */
 63/* *             - added conditionals around canvas update routines         * */
 64/* *             1.0.6 - 06/09/2003 - G. R-P                                * */
 65/* *             - added conditionals around 8-bit magn routines            * */
 66/* *             1.0.6 - 07/07/2003 - G. R-P                                * */
 67/* *             - removed conditionals around 8-bit magn routines          * */
 68/* *             - added conditionals around 16-bit and delta-PNG           * */
 69/* *               supporting code                                          * */
 70/* *             1.0.6 - 07/29/2003 - G.R-P                                 * */
 71/* *             - added SKIPCHUNK conditionals around PAST chunk support   * */
 72/* *             1.0.6 - 08/18/2003 - G.R-P                                 * */
 73/* *             - added conditionals around 1, 2, and 4-bit prototypes     * */
 74/* *                                                                        * */
 75/* *             1.0.7 - 11/27/2003 - R.A                                   * */
 76/* *             - added CANVAS_RGB565 and CANVAS_BGR565                    * */
 77/* *             1.0.7 - 12/06/2003 - R.A                                   * */
 78/* *             - added CANVAS_RGBA565 and CANVAS_BGRA565                  * */
 79/* *             1.0.7 - 01/25/2004 - J.S                                   * */
 80/* *             - added premultiplied alpha canvas' for RGBA, ARGB, ABGR   * */
 81/* *                                                                        * */
 82/* *             1.0.9 - 10/10/2004 - G.R-P.                                * */
 83/* *             - added MNG_NO_1_2_4BIT_SUPPORT                            * */
 84/* *             1.0.9 - 10/14/2004 - G.Juyn                                * */
 85/* *             - added bgr565_a8 canvas-style (thanks to J. Elvander)     * */
 86/* *                                                                        * */
 87/* *             1.0.10 - 03/07/2006 - (thanks to W. Manthey)               * */
 88/* *             - added CANVAS_RGB555 and CANVAS_BGR555                    * */
 89/* *                                                                        * */
 90/* ************************************************************************** */
 91
 92#if defined(__BORLANDC__) && defined(MNG_STRICT_ANSI)
 93#pragma option -A                      /* force ANSI-C */
 94#endif
 95
 96#ifndef _libmng_pixels_h_
 97#define _libmng_pixels_h_
 98
 99/* ************************************************************************** */
100/* *                                                                        * */
101/* * Progressive display check - checks to see if progressive display is    * */
102/* * in order & indicates so                                                * */
103/* *                                                                        * */
104/* * The routine is called after a call to one of the display_xxx routines  * */
105/* * if appropriate                                                         * */
106/* *                                                                        * */
107/* * The refresh is warrented in the read_chunk routine (mng_read.c)        * */
108/* * and only during read&display processing, since there's not much point  * */
109/* * doing it from memory!                                                  * */
110/* *                                                                        * */
111/* ************************************************************************** */
112
113mng_retcode mng_display_progressive_check (mng_datap pData);
114
115/* ************************************************************************** */
116/* *                                                                        * */
117/* * Display routines - convert rowdata (which is already color-corrected)  * */
118/* * to the output canvas, respecting any transparency information          * */
119/* *                                                                        * */
120/* ************************************************************************** */
121
122#ifndef MNG_SKIPCANVAS_RGB8
123mng_retcode mng_display_rgb8           (mng_datap  pData);
124#endif
125#ifndef MNG_SKIPCANVAS_RGBA8
126mng_retcode mng_display_rgba8          (mng_datap  pData);
127#endif
128#ifndef MNG_SKIPCANVAS_RGBA8_PM
129mng_retcode mng_display_rgba8_pm       (mng_datap  pData);
130#endif
131#ifndef MNG_SKIPCANVAS_ARGB8
132mng_retcode mng_display_argb8          (mng_datap  pData);
133#endif
134#ifndef MNG_SKIPCANVAS_ARGB8_PM
135mng_retcode mng_display_argb8_pm       (mng_datap  pData);
136#endif
137#ifndef MNG_SKIPCANVAS_RGB8_A8
138mng_retcode mng_display_rgb8_a8        (mng_datap  pData);
139#endif
140#ifndef MNG_SKIPCANVAS_BGR8
141mng_retcode mng_display_bgr8           (mng_datap  pData);
142#endif
143#ifndef MNG_SKIPCANVAS_BGRX8
144mng_retcode mng_display_bgrx8          (mng_datap  pData);
145#endif
146#ifndef MNG_SKIPCANVAS_BGRA8
147mng_retcode mng_display_bgra8          (mng_datap  pData);
148#endif
149#ifndef MNG_SKIPCANVAS_BGRA8_PM
150mng_retcode mng_display_bgra8_pm       (mng_datap  pData);
151#endif
152#ifndef MNG_SKIPCANVAS_ABGR8
153mng_retcode mng_display_abgr8          (mng_datap  pData);
154#endif
155#ifndef MNG_SKIPCANVAS_ABGR8_PM
156mng_retcode mng_display_abgr8_pm       (mng_datap  pData);
157#endif
158#ifndef MNG_SKIPCANVAS_RGB565
159mng_retcode mng_display_rgb565         (mng_datap  pData);
160#endif
161#ifndef MNG_SKIPCANVAS_RGBA565
162mng_retcode mng_display_rgba565        (mng_datap  pData);
163#endif
164#ifndef MNG_SKIPCANVAS_BGR565
165mng_retcode mng_display_bgr565         (mng_datap  pData);
166#endif
167#ifndef MNG_SKIPCANVAS_BGRA565
168mng_retcode mng_display_bgra565        (mng_datap  pData);
169#endif
170#ifndef MNG_SKIPCANVAS_BGR565_A8
171mng_retcode mng_display_bgr565_a8      (mng_datap  pData);
172#endif
173#ifndef MNG_SKIPCANVAS_RGB555
174mng_retcode mng_display_rgb555         (mng_datap  pData);
175#endif
176#ifndef MNG_SKIPCANVAS_BGR555
177mng_retcode mng_display_bgr555         (mng_datap  pData);
178#endif
179
180/* ************************************************************************** */
181/* *                                                                        * */
182/* * Background restore routines - restore the background with info from    * */
183/* * the BACK and/or bKGD chunk and/or the app's background canvas          * */
184/* *                                                                        * */
185/* ************************************************************************** */
186
187mng_retcode mng_restore_bkgd_backimage (mng_datap  pData);
188mng_retcode mng_restore_bkgd_backcolor (mng_datap  pData);
189mng_retcode mng_restore_bkgd_bkgd      (mng_datap  pData);
190mng_retcode mng_restore_bkgd_bgcolor   (mng_datap  pData);
191#ifndef MNG_SKIPCANVAS_RGB8
192mng_retcode mng_restore_bkgd_rgb8      (mng_datap  pData);
193#endif
194#ifndef MNG_SKIPCANVAS_BGR8
195mng_retcode mng_restore_bkgd_bgr8      (mng_datap  pData);
196#endif
197#ifndef MNG_SKIPCANVAS_BGRX8
198mng_retcode mng_restore_bkgd_bgrx8     (mng_datap  pData);
199#endif
200#ifndef MNG_SKIPCANVAS_RGB565
201mng_retcode mng_restore_bkgd_rgb565    (mng_datap  pData);
202#endif
203#ifndef MNG_SKIPCANVAS_BGR565
204mng_retcode mng_restore_bkgd_bgr565    (mng_datap  pData);
205#endif
206
207/* ************************************************************************** */
208/* *                                                                        * */
209/* * Row retrieval routines - retrieve processed & uncompressed row-data    * */
210/* * from the current "object"                                              * */
211/* *                                                                        * */
212/* ************************************************************************** */
213
214mng_retcode mng_retrieve_g8            (mng_datap  pData);
215mng_retcode mng_retrieve_rgb8          (mng_datap  pData);
216mng_retcode mng_retrieve_idx8          (mng_datap  pData);
217mng_retcode mng_retrieve_ga8           (mng_datap  pData);
218mng_retcode mng_retrieve_rgba8         (mng_datap  pData);
219#ifndef MNG_NO_16BIT_SUPPORT
220mng_retcode mng_retrieve_g16           (mng_datap  pData);
221mng_retcode mng_retrieve_ga16          (mng_datap  pData);
222mng_retcode mng_retrieve_rgb16         (mng_datap  pData);
223mng_retcode mng_retrieve_rgba16        (mng_datap  pData);
224#endif
225
226/* ************************************************************************** */
227/* *                                                                        * */
228/* * Row storage routines - store processed & uncompressed row-data         * */
229/* * into the current "object"                                              * */
230/* *                                                                        * */
231/* ************************************************************************** */
232
233#ifndef MNG_NO_1_2_4BIT_SUPPORT
234mng_retcode mng_store_g1               (mng_datap  pData);
235mng_retcode mng_store_g2               (mng_datap  pData);
236mng_retcode mng_store_g4               (mng_datap  pData);
237mng_retcode mng_store_idx1             (mng_datap  pData);
238mng_retcode mng_store_idx2             (mng_datap  pData);
239mng_retcode mng_store_idx4             (mng_datap  pData);
240#endif
241mng_retcode mng_store_idx8             (mng_datap  pData);
242mng_retcode mng_store_rgb8             (mng_datap  pData);
243mng_retcode mng_store_g8               (mng_datap  pData);
244mng_retcode mng_store_ga8              (mng_datap  pData);
245mng_retcode mng_store_rgba8            (mng_datap  pData);
246#ifndef MNG_NO_16BIT_SUPPORT
247mng_retcode mng_store_g16              (mng_datap  pData);
248mng_retcode mng_store_ga16             (mng_datap  pData);
249mng_retcode mng_store_rgb16            (mng_datap  pData);
250mng_retcode mng_store_rgba16           (mng_datap  pData);
251#endif
252
253/* ************************************************************************** */
254/* *                                                                        * */
255/* * Row storage routines (JPEG) - store processed & uncompressed row-data  * */
256/* * into the current "object"                                              * */
257/* *                                                                        * */
258/* ************************************************************************** */
259
260#ifdef MNG_INCLUDE_JNG
261mng_retcode mng_store_jpeg_g8          (mng_datap  pData);
262mng_retcode mng_store_jpeg_rgb8        (mng_datap  pData);
263mng_retcode mng_store_jpeg_ga8         (mng_datap  pData);
264mng_retcode mng_store_jpeg_rgba8       (mng_datap  pData);
265
266#ifdef MNG_SUPPORT_JPEG12
267mng_retcode mng_store_jpeg_g12         (mng_datap  pData);
268mng_retcode mng_store_jpeg_rgb12       (mng_datap  pData);
269mng_retcode mng_store_jpeg_ga12        (mng_datap  pData);
270mng_retcode mng_store_jpeg_rgba12      (mng_datap  pData);
271#endif
272
273mng_retcode mng_store_jpeg_g8_alpha    (mng_datap  pData);
274mng_retcode mng_store_jpeg_rgb8_alpha  (mng_datap  pData);
275
276#ifndef MNG_NO_1_2_4BIT_SUPPORT
277mng_retcode mng_store_jpeg_g8_a1       (mng_datap  pData);
278mng_retcode mng_store_jpeg_g8_a2       (mng_datap  pData);
279mng_retcode mng_store_jpeg_g8_a4       (mng_datap  pData);
280#endif
281mng_retcode mng_store_jpeg_g8_a8       (mng_datap  pData);
282#ifndef MNG_NO_16BIT_SUPPORT
283mng_retcode mng_store_jpeg_g8_a16      (mng_datap  pData);
284#endif
285
286#ifndef MNG_NO_1_2_4BIT_SUPPORT
287mng_retcode mng_store_jpeg_rgb8_a1     (mng_datap  pData);
288mng_retcode mng_store_jpeg_rgb8_a2     (mng_datap  pData);
289mng_retcode mng_store_jpeg_rgb8_a4     (mng_datap  pData);
290#endif
291mng_retcode mng_store_jpeg_rgb8_a8     (mng_datap  pData);
292#ifndef MNG_NO_16BIT_SUPPORT
293mng_retcode mng_store_jpeg_rgb8_a16    (mng_datap  pData);
294#endif
295
296#ifdef MNG_SUPPORT_JPEG12
297#ifndef MNG_NO_1_2_4BIT_SUPPORT
298mng_retcode mng_store_jpeg_g12_a1      (mng_datap  pData);
299mng_retcode mng_store_jpeg_g12_a2      (mng_datap  pData);
300mng_retcode mng_store_jpeg_g12_a4      (mng_datap  pData);
301#endif
302mng_retcode mng_store_jpeg_g12_a8      (mng_datap  pData);
303#ifndef MNG_NO_16BIT_SUPPORT
304mng_retcode mng_store_jpeg_g12_a16     (mng_datap  pData);
305#endif
306
307#ifndef MNG_NO_1_2_4BIT_SUPPORT
308mng_retcode mng_store_jpeg_rgb12_a1    (mng_datap  pData);
309mng_retcode mng_store_jpeg_rgb12_a2    (mng_datap  pData);
310mng_retcode mng_store_jpeg_rgb12_a4    (mng_datap  pData);
311#endif
312mng_retcode mng_store_jpeg_rgb12_a8    (mng_datap  pData);
313#ifndef MNG_NO_16BIT_SUPPORT
314mng_retcode mng_store_jpeg_rgb12_a16   (mng_datap  pData);
315#endif
316#endif
317#endif
318
319/* ************************************************************************** */
320/* *                                                                        * */
321/* * Delta-image row routines - apply the processed & uncompressed row-data * */
322/* * onto the target "object"                                               * */
323/* *                                                                        * */
324/* ************************************************************************** */
325
326#ifndef MNG_NO_DELTA_PNG
327#ifndef MNG_NO_1_2_4BIT_SUPPORT
328mng_retcode mng_delta_g1               (mng_datap  pData);
329mng_retcode mng_delta_g2               (mng_datap  pData);
330mng_retcode mng_delta_g4               (mng_datap  pData);
331#endif
332mng_retcode mng_delta_g8               (mng_datap  pData);
333mng_retcode mng_delta_g16              (mng_datap  pData);
334mng_retcode mng_delta_rgb8             (mng_datap  pData);
335#ifndef MNG_NO_16BIT_SUPPORT
336mng_retcode mng_delta_rgb16            (mng_datap  pData);
337#endif
338#ifndef MNG_NO_1_2_4BIT_SUPPORT
339mng_retcode mng_delta_idx1             (mng_datap  pData);
340mng_retcode mng_delta_idx2             (mng_datap  pData);
341mng_retcode mng_delta_idx4             (mng_datap  pData);
342#endif
343mng_retcode mng_delta_idx8             (mng_datap  pData);
344mng_retcode mng_delta_ga8              (mng_datap  pData);
345mng_retcode mng_delta_rgba8            (mng_datap  pData);
346#ifndef MNG_NO_16BIT_SUPPORT
347mng_retcode mng_delta_ga16             (mng_datap  pData);
348mng_retcode mng_delta_rgba16           (mng_datap  pData);
349#endif
350
351/* ************************************************************************** */
352/* *                                                                        * */
353/* * Delta-image row routines - apply the source row onto the target        * */
354/* *                                                                        * */
355/* ************************************************************************** */
356
357#ifndef MNG_NO_1_2_4BIT_SUPPORT
358mng_retcode mng_delta_g1_g1            (mng_datap  pData);
359mng_retcode mng_delta_g2_g2            (mng_datap  pData);
360mng_retcode mng_delta_g4_g4            (mng_datap  pData);
361#endif
362mng_retcode mng_delta_g8_g8            (mng_datap  pData);
363#ifndef MNG_NO_16BIT_SUPPORT
364mng_retcode mng_delta_g16_g16          (mng_datap  pData);
365#endif
366mng_retcode mng_delta_ga8_ga8          (mng_datap  pData);
367mng_retcode mng_delta_ga8_g8           (mng_datap  pData);
368mng_retcode mng_delta_ga8_a8           (mng_datap  pData);
369mng_retcode mng_delta_rgba8_rgb8       (mng_datap  pData);
370mng_retcode mng_delta_rgba8_a8         (mng_datap  pData);
371#ifndef MNG_NO_16BIT_SUPPORT
372mng_retcode mng_delta_ga16_ga16        (mng_datap  pData);
373mng_retcode mng_delta_ga16_g16         (mng_datap  pData);
374mng_retcode mng_delta_ga16_a16         (mng_datap  pData);
375mng_retcode mng_delta_rgba16_a16       (mng_datap  pData);
376mng_retcode mng_delta_rgba16_rgb16     (mng_datap  pData);
377#endif
378#endif /* MNG_NO_DELTA_PNG */
379mng_retcode mng_delta_rgb8_rgb8        (mng_datap  pData); /* Used for PAST */
380mng_retcode mng_delta_rgba8_rgba8      (mng_datap  pData);
381#ifndef MNG_NO_16BIT_SUPPORT
382mng_retcode mng_delta_rgb16_rgb16      (mng_datap  pData);
383mng_retcode mng_delta_rgba16_rgba16    (mng_datap  pData);
384#endif
385
386#ifndef MNG_NO_DELTA_PNG
387/* ************************************************************************** */
388/* *                                                                        * */
389/* * Delta-image row routines - scale the delta to bitdepth of target       * */
390/* *                                                                        * */
391/* ************************************************************************** */
392
393#ifndef MNG_NO_1_2_4BIT_SUPPORT
394mng_retcode mng_scale_g1_g2            (mng_datap  pData);
395mng_retcode mng_scale_g1_g4            (mng_datap  pData);
396mng_retcode mng_scale_g1_g8            (mng_datap  pData);
397mng_retcode mng_scale_g2_g4            (mng_datap  pData);
398mng_retcode mng_scale_g2_g8            (mng_datap  pData);
399mng_retcode mng_scale_g4_g8            (mng_datap  pData);
400#endif
401#ifndef MNG_NO_16BIT_SUPPORT
402#ifndef MNG_NO_1_2_4BIT_SUPPORT
403mng_retcode mng_scale_g1_g16           (mng_datap  pData);
404mng_retcode mng_scale_g2_g16           (mng_datap  pData);
405mng_retcode mng_scale_g4_g16           (mng_datap  pData);
406#endif
407mng_retcode mng_scale_g8_g16           (mng_datap  pData);
408mng_retcode mng_scale_ga8_ga16         (mng_datap  pData);
409mng_retcode mng_scale_rgb8_rgb16       (mng_datap  pData);
410mng_retcode mng_scale_rgba8_rgba16     (mng_datap  pData);
411#endif
412
413#ifndef MNG_NO_1_2_4BIT_SUPPORT
414mng_retcode mng_scale_g2_g1            (mng_datap  pData);
415mng_retcode mng_scale_g4_g1            (mng_datap  pData);
416mng_retcode mng_scale_g8_g1            (mng_datap  pData);
417mng_retcode mng_scale_g4_g2            (mng_datap  pData);
418mng_retcode mng_scale_g8_g2            (mng_datap  pData);
419mng_retcode mng_scale_g8_g4            (mng_datap  pData);
420#endif
421#ifndef MNG_NO_16BIT_SUPPORT
422#ifndef MNG_NO_1_2_4BIT_SUPPORT
423mng_retcode mng_scale_g16_g1           (mng_datap  pData);
424mng_retcode mng_scale_g16_g2           (mng_datap  pData);
425mng_retcode mng_scale_g16_g4           (mng_datap  pData);
426#endif
427mng_retcode mng_scale_g16_g8           (mng_datap  pData);
428mng_retcode mng_scale_ga16_ga8         (mng_datap  pData);
429mng_retcode mng_scale_rgb16_rgb8       (mng_datap  pData);
430mng_retcode mng_scale_rgba16_rgba8     (mng_datap  pData);
431#endif
432#endif /* MNG_NO_DELTA_PNG */
433
434/* ************************************************************************** */
435/* *                                                                        * */
436/* * Delta-image bit routines - promote bit_depth                           * */
437/* *                                                                        * */
438/* ************************************************************************** */
439
440mng_uint8   mng_promote_replicate_1_2  (mng_uint8  iB);
441mng_uint8   mng_promote_replicate_1_4  (mng_uint8  iB);
442mng_uint8   mng_promote_replicate_1_8  (mng_uint8  iB);
443mng_uint8   mng_promote_replicate_2_4  (mng_uint8  iB);
444mng_uint8   mng_promote_replicate_2_8  (mng_uint8  iB);
445mng_uint8   mng_promote_replicate_4_8  (mng_uint8  iB);
446#ifndef MNG_NO_16BIT_SUPPORT
447mng_uint16  mng_promote_replicate_1_16 (mng_uint8  iB);
448mng_uint16  mng_promote_replicate_2_16 (mng_uint8  iB);
449mng_uint16  mng_promote_replicate_4_16 (mng_uint8  iB);
450mng_uint16  mng_promote_replicate_8_16 (mng_uint8  iB);
451#endif
452
453/* ************************************************************************** */
454
455#ifndef MNG_NO_DELTA_PNG
456mng_uint8   mng_promote_zerofill_1_2   (mng_uint8  iB);
457mng_uint8   mng_promote_zerofill_1_4   (mng_uint8  iB);
458mng_uint8   mng_promote_zerofill_1_8   (mng_uint8  iB);
459mng_uint8   mng_promote_zerofill_2_4   (mng_uint8  iB);
460mng_uint8   mng_promote_zerofill_2_8   (mng_uint8  iB);
461mng_uint8   mng_promote_zerofill_4_8   (mng_uint8  iB);
462#ifndef MNG_NO_16BIT_SUPPORT
463mng_uint16  mng_promote_zerofill_1_16  (mng_uint8  iB);
464mng_uint16  mng_promote_zerofill_2_16  (mng_uint8  iB);
465mng_uint16  mng_promote_zerofill_4_16  (mng_uint8  iB);
466mng_uint16  mng_promote_zerofill_8_16  (mng_uint8  iB);
467#endif
468#endif /* MNG_NO_DELTA_PNG */
469
470/* ************************************************************************** */
471/* *                                                                        * */
472/* * Delta-image row routines - promote color_type                          * */
473/* *                                                                        * */
474/* ************************************************************************** */
475
476mng_retcode mng_promote_g8_g8          (mng_datap  pData);
477#ifndef MNG_NO_16BIT_SUPPORT
478mng_retcode mng_promote_g8_g16         (mng_datap  pData);
479mng_retcode mng_promote_g16_g16        (mng_datap  pData);
480#endif
481
482mng_retcode mng_promote_g8_ga8         (mng_datap  pData);
483#ifndef MNG_NO_16BIT_SUPPORT
484mng_retcode mng_promote_g8_ga16        (mng_datap  pData);
485mng_retcode mng_promote_g16_ga16       (mng_datap  pData);
486#endif
487
488mng_retcode mng_promote_g8_rgb8        (mng_datap  pData);
489#ifndef MNG_NO_16BIT_SUPPORT
490mng_retcode mng_promote_g8_rgb16       (mng_datap  pData);
491mng_retcode mng_promote_g16_rgb16      (mng_datap  pData);
492#endif
493
494mng_retcode mng_promote_g8_rgba8       (mng_datap  pData);
495#ifndef MNG_NO_16BIT_SUPPORT
496mng_retcode mng_promote_g8_rgba16      (mng_datap  pData);
497mng_retcode mng_promote_g16_rgba16     (mng_datap  pData);
498
499mng_retcode mng_promote_ga8_ga16       (mng_datap  pData);
500#endif
501
502mng_retcode mng_promote_ga8_rgba8      (mng_datap  pData);
503#ifndef MNG_NO_16BIT_SUPPORT
504mng_retcode mng_promote_ga8_rgba16     (mng_datap  pData);
505mng_retcode mng_promote_ga16_rgba16    (mng_datap  pData);
506#endif
507
508#ifndef MNG_NO_16BIT_SUPPORT
509mng_retcode mng_promote_rgb8_rgb16     (mng_datap  pData);
510#endif
511
512mng_retcode mng_promote_rgb8_rgba8     (mng_datap  pData);
513#ifndef MNG_NO_16BIT_SUPPORT
514mng_retcode mng_promote_rgb8_rgba16    (mng_datap  pData);
515mng_retcode mng_promote_rgb16_rgba16   (mng_datap  pData);
516#endif
517
518mng_retcode mng_promote_idx8_rgb8      (mng_datap  pData);
519#ifndef MNG_NO_16BIT_SUPPORT
520mng_retcode mng_promote_idx8_rgb16     (mng_datap  pData);
521#endif
522
523mng_retcode mng_promote_idx8_rgba8     (mng_datap  pData);
524#ifndef MNG_NO_16BIT_SUPPORT
525mng_retcode mng_promote_idx8_rgba16    (mng_datap  pData);
526
527mng_retcode mng_promote_rgba8_rgba16   (mng_datap  pData);
528#endif
529
530/* ************************************************************************** */
531/* *                                                                        * */
532/* * Row processing routines - convert uncompressed data from zlib to       * */
533/* * managable row-data which serves as input to the color-management       * */
534/* * routines                                                               * */
535/* *                                                                        * */
536/* ************************************************************************** */
537
538#ifndef MNG_NO_1_2_4BIT_SUPPORT
539mng_retcode mng_process_g1             (mng_datap  pData);
540mng_retcode mng_process_g2             (mng_datap  pData);
541mng_retcode mng_process_g4             (mng_datap  pData);
542#endif
543mng_retcode mng_process_g8             (mng_datap  pData);
544mng_retcode mng_process_rgb8           (mng_datap  pData);
545#ifndef MNG_NO_1_2_4BIT_SUPPORT
546mng_retcode mng_process_idx1           (mng_datap  pData);
547mng_retcode mng_process_idx2           (mng_datap  pData);
548mng_retcode mng_process_idx4           (mng_datap  pData);
549#endif
550mng_retcode mng_process_idx8           (mng_datap  pData);
551mng_retcode mng_process_ga8            (mng_datap  pData);
552mng_retcode mng_process_rgba8          (mng_datap  pData);
553#ifndef MNG_NO_16BIT_SUPPORT
554mng_retcode mng_process_g16            (mng_datap  pData);
555mng_retcode mng_process_ga16           (mng_datap  pData);
556mng_retcode mng_process_rgb16          (mng_datap  pData);
557mng_retcode mng_process_rgba16         (mng_datap  pData);
558#endif
559
560/* ************************************************************************** */
561/* *                                                                        * */
562/* * Row processing initialization routines - set up the variables needed   * */
563/* * to process uncompressed row-data                                       * */
564/* *                                                                        * */
565/* ************************************************************************** */
566
567#ifndef MNG_OPTIMIZE_FOOTPRINT_INIT
568#ifndef MNG_NO_1_2_4BIT_SUPPORT
569mng_retcode mng_init_g1_i              (mng_datap  pData);
570mng_retcode mng_init_g2_i              (mng_datap  pData);
571mng_retcode mng_init_g4_i              (mng_datap  pData);
572#endif
573mng_retcode mng_init_g8_i              (mng_datap  pData);
574mng_retcode mng_init_rgb8_i            (mng_datap  pData);
575#ifndef MNG_NO_1_2_4BIT_SUPPORT
576mng_retcode mng_init_idx1_i            (mng_datap  pData);
577mng_retcode mng_init_idx2_i            (mng_datap  pData);
578mng_retcode mng_init_idx4_i            (mng_datap  pData);
579#endif
580mng_retcode mng_init_idx8_i            (mng_datap  pData);
581mng_retcode mng_init_ga8_i             (mng_datap  pData);
582mng_retcode mng_init_rgba8_i           (mng_datap  pData);
583#ifndef MNG_NO_1_2_4BIT_SUPPORT
584mng_retcode mng_init_g1_ni             (mng_datap  pData);
585mng_retcode mng_init_g2_ni             (mng_datap  pData);
586mng_retcode mng_init_g4_ni             (mng_datap  pData);
587#endif
588mng_retcode mng_init_g8_ni             (mng_datap  pData);
589mng_retcode mng_init_rgb8_ni           (mng_datap  pData);
590#ifndef MNG_NO_1_2_4BIT_SUPPORT
591mng_retcode mng_init_idx1_ni           (mng_datap  pData);
592mng_retcode mng_init_idx2_ni           (mng_datap  pData);
593mng_retcode mng_init_idx4_ni           (mng_datap  pData);
594#endif
595mng_retcode mng_init_idx8_ni           (mng_datap  pData);
596mng_retcode mng_init_ga8_ni            (mng_datap  pData);
597mng_retcode mng_init_rgba8_ni          (mng_datap  pData);
598#ifndef MNG_NO_16BIT_SUPPORT
599mng_retcode mng_init_g16_i             (mng_datap  pData);
600mng_retcode mng_init_rgb16_i           (mng_datap  pData);
601mng_retcode mng_init_ga16_i            (mng_datap  pData);
602mng_retcode mng_init_rgba16_i          (mng_datap  pData);
603mng_retcode mng_init_g16_ni            (mng_datap  pData);
604mng_retcode mng_init_rgb16_ni          (mng_datap  pData);
605mng_retcode mng_init_ga16_ni           (mng_datap  pData);
606mng_retcode mng_init_rgba16_ni         (mng_datap  pData);
607#endif
608#endif
609
610/* ************************************************************************** */
611/* *                                                                        * */
612/* * Row processing initialization routines (JPEG) - set up the variables   * */
613/* * needed to process uncompressed row-data                                * */
614/* *                                                                        * */
615/* ************************************************************************** */
616
617#ifndef MNG_OPTIMIZE_FOOTPRINT_INIT
618#ifdef MNG_INCLUDE_JNG
619#ifndef MNG_NO_1_2_4BIT_SUPPORT
620mng_retcode mng_init_jpeg_a1_ni        (mng_datap  pData);
621mng_retcode mng_init_jpeg_a2_ni        (mng_datap  pData);
622mng_retcode mng_init_jpeg_a4_ni        (mng_datap  pData);
623#endif
624mng_retcode mng_init_jpeg_a8_ni        (mng_datap  pData);
625#ifndef MNG_NO_16BIT_SUPPORT
626mng_retcode mng_init_jpeg_a16_ni       (mng_datap  pData);
627#endif
628#endif
629#endif
630
631/* ************************************************************************** */
632/* *                                                                        * */
633/* * General row processing routines                                        * */
634/* *                                                                        * */
635/* ************************************************************************** */
636
637mng_retcode mng_init_rowproc           (mng_datap  pData);
638mng_retcode mng_next_row               (mng_datap  pData);
639#ifdef MNG_INCLUDE_JNG
640mng_retcode mng_next_jpeg_alpharow     (mng_datap  pData);
641mng_retcode mng_next_jpeg_row          (mng_datap  pData);
642#endif
643mng_retcode mng_cleanup_rowproc        (mng_datap  pData);
644
645/* ************************************************************************** */
646/* *                                                                        * */
647/* * Magnification row routines - apply magnification transforms            * */
648/* *                                                                        * */
649/* ************************************************************************** */
650
651#ifndef MNG_OPTIMIZE_FOOTPRINT_MAGN
652mng_retcode mng_magnify_g8_x1          (mng_datap  pData,
653                                        mng_uint16 iMX,
654                                        mng_uint16 iML,
655                                        mng_uint16 iMR,
656                                        mng_uint32 iWidth,
657                                        mng_uint8p pSrcline,
658                                        mng_uint8p pDstline);
659mng_retcode mng_magnify_g8_x2          (mng_datap  pData,
660                                        mng_uint16 iMX,
661                                        mng_uint16 iML,
662                                        mng_uint16 iMR,
663                                        mng_uint32 iWidth,
664                                        mng_uint8p pSrcline,
665                                        mng_uint8p pDstline);
666mng_retcode mng_magnify_g8_x3          (mng_datap  pData,
667                                        mng_uint16 iMX,
668                                        mng_uint16 iML,
669                                        mng_uint16 iMR,
670                                        mng_uint32 iWidth,
671                                        mng_uint8p pSrcline,
672                                        mng_uint8p pDstline);
673mng_retcode mng_magnify_rgb8_x1        (mng_datap  pData,
674                                        mng_uint16 iMX,
675                                        mng_uint16 iML,
676                                        mng_uint16 iMR,
677                                        mng_uint32 iWidth,
678                                        mng_uint8p pSrcline,
679                                        mng_uint8p pDstline);
680mng_retcode mng_magnify_rgb8_x2        (mng_datap  pData,
681                                        mng_uint16 iMX,
682                                        mng_uint16 iML,
683                                        mng_uint16 iMR,
684                                        mng_uint32 iWidth,
685                                        mng_uint8p pSrcline,
686                                        mng_uint8p pDstline);
687mng_retcode mng_magnify_rgb8_x3        (mng_datap  pData,
688                                        mng_uint16 iMX,
689                                        mng_uint16 iML,
690                                        mng_uint16 iMR,
691                                        mng_uint32 iWidth,
692                                        mng_uint8p pSrcline,
693                                        mng_uint8p pDstline);
694mng_retcode mng_magnify_ga8_x1         (mng_datap  pData,
695                                        mng_uint16 iMX,
696                                        mng_uint16 iML,
697                                        mng_uint16 iMR,
698                                        mng_uint32 iWidth,
699                                        mng_uint8p pSrcline,
700                                        mng_uint8p pDstline);
701mng_retcode mng_magnify_ga8_x2         (mng_datap  pData,
702                                        mng_uint16 iMX,
703                                        mng_uint16 iML,
704                                        mng_uint16 iMR,
705                                        mng_uint32 iWidth,
706                                        mng_uint8p pSrcline,
707                                        mng_uint8p pDstline);
708mng_retcode mng_magnify_ga8_x3         (mng_datap  pData,
709                                        mng_uint16 iMX,
710                                        mng_uint16 iML,
711                                        mng_uint16 iMR,
712                                        mng_uint32 iWidth,
713                                        mng_uint8p pSrcline,
714                                        mng_uint8p pDstline);
715mng_retcode mng_magnify_ga8_x4         (mng_datap  pData,
716                                        mng_uint16 iMX,
717                                        mng_uint16 iML,
718                                        mng_uint16 iMR,
719                                        mng_uint32 iWidth,
720                                        mng_uint8p pSrcline,
721                                        mng_uint8p pDstline);
722mng_retcode mng_magnify_ga8_x5         (mng_datap  pData,
723                                        mng_uint16 iMX,
724                                        mng_uint16 iML,
725                                        mng_uint16 iMR,
726                                        mng_uint32 iWidth,
727                                        mng_uint8p pSrcline,
728                                        mng_uint8p pDstline);
729#endif
730mng_retcode mng_magnify_rgba8_x1       (mng_datap  pData,
731                                        mng_uint16 iMX,
732                                        mng_uint16 iML,
733                                        mng_uint16 iMR,
734                                        mng_uint32 iWidth,
735                                        mng_uint8p pSrcline,
736                                        mng_uint8p pDstline);
737mng_retcode mng_magnify_rgba8_x2       (mng_datap  pData,
738                                        mng_uint16 iMX,
739                                        mng_uint16 iML,
740                                        mng_uint16 iMR,
741                                        mng_uint32 iWidth,
742                                        mng_uint8p pSrcline,
743                                        mng_uint8p pDstline);
744mng_retcode mng_magnify_rgba8_x3       (mng_datap  pData,
745                                        mng_uint16 iMX,
746                                        mng_uint16 iML,
747                                        mng_uint16 iMR,
748                                        mng_uint32 iWidth,
749                                        mng_uint8p pSrcline,
750                                        mng_uint8p pDstline);
751mng_retcode mng_magnify_rgba8_x4       (mng_datap  pData,
752                                        mng_uint16 iMX,
753                                        mng_uint16 iML,
754                                        mng_uint16 iMR,
755                                        mng_uint32 iWidth,
756                                        mng_uint8p pSrcline,
757                                        mng_uint8p pDstline);
758mng_retcode mng_magnify_rgba8_x5       (mng_datap  pData,
759                                        mng_uint16 iMX,
760                                        mng_uint16 iML,
761                                        mng_uint16 iMR,
762                                        mng_uint32 iWidth,
763                                        mng_uint8p pSrcline,
764                                        mng_uint8p pDstline);
765#ifndef MNG_OPTIMIZE_FOOTPRINT_MAGN
766mng_retcode mng_magnify_g8_y1          (mng_datap  pData,
767                                        mng_int32  iS,
768                                        mng_int32  iM,
769                                        mng_uint32 iWidth,
770                                        mng_uint8p pSrcline1,
771                                        mng_uint8p pSrcline2,
772                                        mng_uint8p pDstline);
773mng_retcode mng_magnify_g8_y2          (mng_datap  pData,
774                                        mng_int32  iS,
775                                        mng_int32  iM,
776                                        mng_uint32 iWidth,
777                                        mng_uint8p pSrcline1,
778                                        mng_uint8p pSrcline2,
779                                        mng_uint8p pDstline);
780mng_retcode mng_magnify_g8_y3          (mng_datap  pData,
781                                        mng_int32  iS,
782                                        mng_int32  iM,
783                                        mng_uint32 iWidth,
784                                        mng_uint8p pSrcline1,
785                                        mng_uint8p pSrcline2,
786                                        mng_uint8p pDstline);
787mng_retcode mng_magnify_rgb8_y1        (mng_datap  pData,
788                                        mng_int32  iS,
789                                        mng_int32  iM,
790                                        mng_uint32 iWidth,
791                                        mng_uint8p pSrcline1,
792                                        mng_uint8p pSrcline2,
793                                        mng_uint8p pDstline);
794mng_retcode mng_magnify_rgb8_y2        (mng_datap  pData,
795                                        mng_int32  iS,
796                                        mng_int32  iM,
797                                        mng_uint32 iWidth,
798                                        mng_uint8p pSrcline1,
799                                        mng_uint8p pSrcline2,
800                                        mng_uint8p pDstline);
801mng_retcode mng_magnify_rgb8_y3        (mng_datap  pData,
802                                        mng_int32  iS,
803                                        mng_int32  iM,
804                                        mng_uint32 iWidth,
805                                        mng_uint8p pSrcline1,
806                                        mng_uint8p pSrcline2,
807                                        mng_uint8p pDstline);
808mng_retcode mng_magnify_ga8_y1         (mng_datap  pData,
809                                        mng_int32  iS,
810                                        mng_int32  iM,
811                                        mng_uint32 iWidth,
812                                        mng_uint8p pSrcline1,
813                                        mng_uint8p pSrcline2,
814                                        mng_uint8p pDstline);
815mng_retcode mng_magnify_ga8_y2         (mng_datap  pData,
816                                        mng_int32  iS,
817                                        mng_int32  iM,
818                                        mng_uint32 iWidth,
819                                        mng_uint8p pSrcline1,
820                                        mng_uint8p pSrcline2,
821                                        mng_uint8p pDstline);
822mng_retcode mng_magnify_ga8_y3         (mng_datap  pData,
823                                        mng_int32  iS,
824                                        mng_int32  iM,
825                                        mng_uint32 iWidth,
826                                        mng_uint8p pSrcline1,
827                                        mng_uint8p pSrcline2,
828                                        mng_uint8p pDstline);
829mng_retcode mng_magnify_ga8_y4         (mng_datap  pData,
830                                        mng_int32  iS,
831                                        mng_int32  iM,
832                                        mng_uint32 iWidth,
833                                        mng_uint8p pSrcline1,
834                                        mng_uint8p pSrcline2,
835                                        mng_uint8p pDstline);
836mng_retcode mng_magnify_ga8_y5         (mng_datap  pData,
837                                        mng_int32  iS,
838                                        mng_int32  iM,
839                                        mng_uint32 iWidth,
840                                        mng_uint8p pSrcline1,
841                                        mng_uint8p pSrcline2,
842                                        mng_uint8p pDstline);
843#endif
844mng_retcode mng_magnify_rgba8_y1       (mng_datap  pData,
845                                        mng_int32  iS,
846                                        mng_int32  iM,
847                                        mng_uint32 iWidth,
848                                        mng_uint8p pSrcline1,
849                                        mng_uint8p pSrcline2,
850                                        mng_uint8p pDstline);
851mng_retcode mng_magnify_rgba8_y2       (mng_datap  pData,
852                                        mng_int32  iS,
853                                        mng_int32  iM,
854                                        mng_uint32 iWidth,
855                                        mng_uint8p pSrcline1,
856                                        mng_uint8p pSrcline2,
857                                        mng_uint8p pDstline);
858mng_retcode mng_magnify_rgba8_y3       (mng_datap  pData,
859                                        mng_int32  iS,
860                                        mng_int32  iM,
861                                        mng_uint32 iWidth,
862                                        mng_uint8p pSrcline1,
863                                        mng_uint8p pSrcline2,
864                                        mng_uint8p pDstline);
865mng_retcode mng_magnify_rgba8_y4       (mng_datap  pData,
866                                        mng_int32  iS,
867                                        mng_int32  iM,
868                                        mng_uint32 iWidth,
869                                        mng_uint8p pSrcline1,
870                                        mng_uint8p pSrcline2,
871                                        mng_uint8p pDstline);
872mng_retcode mng_magnify_rgba8_y5       (mng_datap  pData,
873                                        mng_int32  iS,
874                                        mng_int32  iM,
875                                        mng_uint32 iWidth,
876                                        mng_uint8p pSrcline1,
877                                        mng_uint8p pSrcline2,
878                                        mng_uint8p pDstline);
879
880/* ************************************************************************** */
881#ifndef MNG_NO_16BIT_SUPPORT
882#ifndef MNG_OPTIMIZE_FOOTPRINT_MAGN
883mng_retcode mng_magnify_g16_x1         (mng_datap  pData,
884                                        mng_uint16 iMX,
885                                        mng_uint16 iML,
886                                        mng_uint16 iMR,
887                                        mng_uint32 iWidth,
888                                        mng_uint8p pSrcline,
889                                        mng_uint8p pDstline);
890mng_retcode mng_magnify_g16_x2         (mng_datap  pData,
891                                        mng_uint16 iMX,
892                                        mng_uint16 iML,
893                                        mng_uint16 iMR,
894                                        mng_uint32 iWidth,
895                                        mng_uint8p pSrcline,
896                                        mng_uint8p pDstline);
897mng_retcode mng_magnify_g16_x3         (mng_datap  pData,
898                                        mng_uint16 iMX,
899                                        mng_uint16 iML,
900                                        mng_uint16 iMR,
901                                        mng_uint32 iWidth,
902                                        mng_uint8p pSrcline,
903                                        mng_uint8p pDstline);
904mng_retcode mng_magnify_rgb16_x1       (mng_datap  pData,
905                                        mng_uint16 iMX,
906                                        mng_uint16 iML,
907                                        mng_uint16 iMR,
908                                        mng_uint32 iWidth,
909                                        mng_uint8p pSrcline,
910                                        mng_uint8p pDstline);
911mng_retcode mng_magnify_rgb16_x2       (mng_datap  pData,
912                                        mng_uint16 iMX,
913                                        mng_uint16 iML,
914                                        mng_uint16 iMR,
915                                        mng_uint32 iWidth,
916                                        mng_uint8p pSrcline,
917                                        mng_uint8p pDstline);
918mng_retcode mng_magnify_rgb16_x3       (mng_datap  pData,
919                                        mng_uint16 iMX,
920                                        mng_uint16 iML,
921                                        mng_uint16 iMR,
922                                        mng_uint32 iWidth,
923                                        mng_uint8p pSrcline,
924                                        mng_uint8p pDstline);
925mng_retcode mng_magnify_ga16_x1        (mng_datap  pData,
926                                        mng_uint16 iMX,
927                                        mng_uint16 iML,
928                                        mng_uint16 iMR,
929                                        mng_uint32 iWidth,
930                                        mng_uint8p pSrcline,
931                                        mng_uint8p pDstline);
932mng_retcode mng_magnify_ga16_x2        (mng_datap  pData,
933                                        mng_uint16 iMX,
934                                        mng_uint16 iML,
935                                        mng_uint16 iMR,
936                                        mng_uint32 iWidth,
937                                        mng_uint8p pSrcline,
938                                        mng_uint8p pDstline);
939mng_retcode mng_magnify_ga16_x3        (mng_datap  pData,
940                                        mng_uint16 iMX,
941                                        mng_uint16 iML,
942                                        mng_uint16 iMR,
943                                        mng_uint32 iWidth,
944                                        mng_uint8p pSrcline,
945                                        mng_uint8p pDstline);
946mng_retcode mng_magnify_ga16_x4        (mng_datap  pData,
947                                        mng_uint16 iMX,
948     

Large files files are truncated, but you can click here to view the full file