/src/ghostpdl/jpegxr/x_strip.c
Line | Count | Source |
1 | | |
2 | | /************************************************************************* |
3 | | * |
4 | | * This software module was originally contributed by Microsoft |
5 | | * Corporation in the course of development of the |
6 | | * ITU-T T.832 | ISO/IEC 29199-2 ("JPEG XR") format standard for |
7 | | * reference purposes and its performance may not have been optimized. |
8 | | * |
9 | | * This software module is an implementation of one or more |
10 | | * tools as specified by the JPEG XR standard. |
11 | | * |
12 | | * ITU/ISO/IEC give You a royalty-free, worldwide, non-exclusive |
13 | | * copyright license to copy, distribute, and make derivative works |
14 | | * of this software module or modifications thereof for use in |
15 | | * products claiming conformance to the JPEG XR standard as |
16 | | * specified by ITU-T T.832 | ISO/IEC 29199-2. |
17 | | * |
18 | | * ITU/ISO/IEC give users the same free license to this software |
19 | | * module or modifications thereof for research purposes and further |
20 | | * ITU/ISO/IEC standardization. |
21 | | * |
22 | | * Those intending to use this software module in products are advised |
23 | | * that its use may infringe existing patents. ITU/ISO/IEC have no |
24 | | * liability for use of this software module or modifications thereof. |
25 | | * |
26 | | * Copyright is not released for products that do not conform to |
27 | | * to the JPEG XR standard as specified by ITU-T T.832 | |
28 | | * ISO/IEC 29199-2. |
29 | | * |
30 | | ******** Section to be removed when the standard is published ************ |
31 | | * |
32 | | * Assurance that the contributed software module can be used |
33 | | * (1) in the ITU-T "T.JXR" | ISO/IEC 29199 ("JPEG XR") standard once the |
34 | | * standard has been adopted; and |
35 | | * (2) to develop the JPEG XR standard: |
36 | | * |
37 | | * Microsoft Corporation and any subsequent contributors to the development |
38 | | * of this software grant ITU/ISO/IEC all rights necessary to include |
39 | | * the originally developed software module or modifications thereof in the |
40 | | * JPEG XR standard and to permit ITU/ISO/IEC to offer such a royalty-free, |
41 | | * worldwide, non-exclusive copyright license to copy, distribute, and make |
42 | | * derivative works of this software module or modifications thereof for |
43 | | * use in products claiming conformance to the JPEG XR standard as |
44 | | * specified by ITU-T T.832 | ISO/IEC 29199-2, and to the extent that |
45 | | * such originally developed software module or portions of it are included |
46 | | * in an ITU/ISO/IEC standard. To the extent that the original contributors |
47 | | * may own patent rights that would be required to make, use, or sell the |
48 | | * originally developed software module or portions thereof included in the |
49 | | * ITU/ISO/IEC standard in a conforming product, the contributors will |
50 | | * assure ITU/ISO/IEC that they are willing to negotiate licenses under |
51 | | * reasonable and non-discriminatory terms and conditions with |
52 | | * applicants throughout the world and in accordance with their patent |
53 | | * rights declarations made to ITU/ISO/IEC (if any). |
54 | | * |
55 | | * Microsoft, any subsequent contributors, and ITU/ISO/IEC additionally |
56 | | * gives You a free license to this software module or modifications |
57 | | * thereof for the sole purpose of developing the JPEG XR standard. |
58 | | * |
59 | | ******** end of section to be removed when the standard is published ***** |
60 | | * |
61 | | * Microsoft Corporation retains full right to modify and use the code |
62 | | * for its own purpose, to assign or donate the code to a third party, |
63 | | * and to inhibit third parties from using the code for products that |
64 | | * do not conform to the JPEG XR standard as specified by ITU-T T.832 | |
65 | | * ISO/IEC 29199-2. |
66 | | * |
67 | | * This copyright notice must be included in all copies or derivative |
68 | | * works. |
69 | | * |
70 | | * Copyright (c) ITU-T/ISO/IEC 2008, 2009. |
71 | | ***********************************************************************/ |
72 | | |
73 | | #ifdef _MSC_VER |
74 | | #pragma comment (user,"$Id: x_strip.c,v 1.7 2011-04-28 08:45:43 thor Exp $") |
75 | | #endif |
76 | | |
77 | | # include "jxr_priv.h" |
78 | | # include <assert.h> |
79 | | |
80 | | void _jxr_clear_strip_cur(jxr_image_t image) |
81 | 0 | { |
82 | 0 | int ch; |
83 | 0 | assert(image->num_channels > 0); |
84 | 0 | for (ch = 0 ; ch < image->num_channels ; ch += 1) { |
85 | 0 | unsigned idx; |
86 | 0 | for (idx = 0 ; idx < EXTENDED_WIDTH_BLOCKS(image) ; idx += 1) { |
87 | 0 | int jdx; |
88 | 0 | for (jdx = 0 ; jdx < 256 ; jdx += 1) |
89 | 0 | image->strip[ch].cur[idx].data[jdx] = 0; |
90 | 0 | } |
91 | 0 | } |
92 | 0 | } |
93 | | |
94 | | /* |
95 | | * $Log: x_strip.c,v $ |
96 | | * Revision 1.7 2011-04-28 08:45:43 thor |
97 | | * Fixed compiler warnings, ported to gcc 4.4, removed obsolete files. |
98 | | * |
99 | | * Revision 1.6 2010-03-31 07:50:59 thor |
100 | | * Replaced by the latest MS version. |
101 | | * |
102 | | * Revision 1.6 2009/05/29 12:00:00 microsoft |
103 | | * Reference Software v1.6 updates. |
104 | | * |
105 | | * Revision 1.5 2009/04/13 12:00:00 microsoft |
106 | | * Reference Software v1.5 updates. |
107 | | * |
108 | | * Revision 1.4 2008/03/05 06:58:10 gus |
109 | | * *** empty log message *** |
110 | | * |
111 | | * Revision 1.3 2008/02/26 23:52:45 steve |
112 | | * Remove ident for MS compilers. |
113 | | * |
114 | | * Revision 1.2 2007/11/26 01:47:16 steve |
115 | | * Add copyright notices per MS request. |
116 | | * |
117 | | * Revision 1.1 2007/11/12 23:21:55 steve |
118 | | * Infrastructure for frequency mode ordering. |
119 | | * |
120 | | */ |
121 | | |