1 /*
2 * GStreamer
3 *
4 * unit test for jpeg2000parse
5 *
6 * Copyright (C) 2019 Collabora Inc. All rights reserved.
7 *
8 * Contact: Aaron Boxer <aaron.boxer@collabora.com>
9 *
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Library General Public
12 * License as published by the Free Software Foundation; either
13 * version 2 of the License, or (at your option) any later version.
14 *
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Library General Public License for more details.
19 *
20 * You should have received a copy of the GNU Library General Public
21 * License along with this library; if not, write to the
22 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
23 * Boston, MA 02110-1301, USA.
24 */
25
26 #include "parser.h"
27 #include <gst/codecparsers/gstjpeg2000sampling.h>
28
29 static GstStaticPadTemplate srctemplate_jpc =
30 GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC,
31 GST_PAD_ALWAYS,
32 GST_STATIC_CAPS ("image/x-jpc, parsed=(boolean)false"));
33
34 static GstStaticPadTemplate srctemplate_j2c =
35 GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC,
36 GST_PAD_ALWAYS,
37 GST_STATIC_CAPS ("image/x-j2c, parsed=(boolean)false"));
38
39 static GstStaticPadTemplate srctemplate_jp2 =
40 GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC,
41 GST_PAD_ALWAYS,
42 GST_STATIC_CAPS ("image/jp2, parsed=(boolean)false"));
43
44 #define SINK_CAPS_MONO_TMPL " width = (int) 32, height = (int) 32, \
45 sampling = (string) GRAYSCALE, profile = (int) 0, \
46 colorspace = (string) GRAY, parsed = (boolean) true;"
47
48 static GstStaticPadTemplate sinktemplate_mono_jpc =
49 GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK,
50 GST_PAD_ALWAYS,
51 GST_STATIC_CAPS ("image/x-jpc," SINK_CAPS_MONO_TMPL)
52 );
53
54 static GstStaticPadTemplate sinktemplate_mono_j2c =
55 GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK,
56 GST_PAD_ALWAYS,
57 GST_STATIC_CAPS ("image/x-j2c," SINK_CAPS_MONO_TMPL)
58 );
59
60 #define SINK_CAPS_RGB_TMPL " width = (int) 32, height = (int) 32, \
61 sampling = (string) RGB, profile = (int) 0, \
62 colorspace = (string) sRGB, parsed = (boolean) true;"
63
64 static GstStaticPadTemplate sinktemplate_rgb_jpc =
65 GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK,
66 GST_PAD_ALWAYS,
67 GST_STATIC_CAPS ("image/x-jpc," SINK_CAPS_RGB_TMPL)
68 );
69
70 static GstStaticPadTemplate sinktemplate_rgb_j2c =
71 GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK,
72 GST_PAD_ALWAYS,
73 GST_STATIC_CAPS ("image/x-j2c," SINK_CAPS_RGB_TMPL)
74 );
75
76 static guint8 *jpeg2000_codec_data = NULL;
77 static gsize jpge2000_codec_data_size = 0;
78
79 unsigned char rgb_32_32_j2k[] = {
80 0xff, 0x4f, 0xff, 0x51, 0x00, 0x2f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20,
81 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
82 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00,
83 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x01, 0x01, 0x07, 0x01, 0x01,
84 0x07, 0x01, 0x01, 0xff, 0x52, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x01, 0x01,
85 0x05, 0x04, 0x04, 0x00, 0x01, 0xff, 0x5c, 0x00, 0x13, 0x40, 0x40, 0x48,
86 0x48, 0x50, 0x48, 0x48, 0x50, 0x48, 0x48, 0x50, 0x48, 0x48, 0x50, 0x48,
87 0x48, 0x50, 0xff, 0x64, 0x00, 0x25, 0x00, 0x01, 0x43, 0x72, 0x65, 0x61,
88 0x74, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x4f, 0x70, 0x65, 0x6e, 0x4a,
89 0x50, 0x45, 0x47, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20,
90 0x32, 0x2e, 0x33, 0x2e, 0x31, 0xff, 0x90, 0x00, 0x0a, 0x00, 0x00, 0x00,
91 0x00, 0x02, 0x4f, 0x00, 0x01, 0xff, 0x93, 0xcf, 0xb4, 0x08, 0x03, 0x1f,
92 0xc3, 0xe7, 0x02, 0x08, 0xc1, 0xf2, 0x01, 0x00, 0xc0, 0x7c, 0x20, 0xc3,
93 0xea, 0x02, 0x80, 0x10, 0x80, 0x09, 0x07, 0x3f, 0x07, 0xc0, 0x7c, 0x20,
94 0xcf, 0xc0, 0x0a, 0x07, 0xce, 0x08, 0x05, 0x02, 0xef, 0x00, 0x7f, 0xc0,
95 0x3a, 0x0c, 0x0f, 0x90, 0x0c, 0x03, 0xe1, 0x04, 0x01, 0x00, 0x09, 0xc0,
96 0x7c, 0x21, 0xc0, 0xf9, 0x02, 0x40, 0x3e, 0x10, 0xc0, 0x10, 0x9a, 0x7f,
97 0x0d, 0xfa, 0x01, 0x7f, 0x10, 0x93, 0x7f, 0xc0, 0xf9, 0x01, 0xc7, 0xda,
98 0x0b, 0x01, 0xf2, 0x04, 0x0e, 0x41, 0x06, 0x08, 0xd9, 0xee, 0x60, 0x07,
99 0x0d, 0x72, 0x91, 0xbf, 0xc0, 0x7c, 0x21, 0xcf, 0xc0, 0x1a, 0x03, 0xe4,
100 0x06, 0x0d, 0x93, 0x4f, 0x0c, 0x17, 0xac, 0x9f, 0xc7, 0x3f, 0x0d, 0x8e,
101 0x7f, 0xc0, 0x3a, 0x2c, 0xfc, 0x03, 0xe0, 0x0e, 0x8c, 0x16, 0xa3, 0xbe,
102 0xff, 0x6f, 0x00, 0xcf, 0xca, 0xc7, 0x45, 0x46, 0x09, 0x8f, 0xcd, 0x8e,
103 0x86, 0x17, 0x84, 0x9d, 0x4c, 0x24, 0xa5, 0xd4, 0x77, 0xac, 0x3f, 0xc0,
104 0x7c, 0x23, 0x4f, 0xc0, 0x36, 0x01, 0xf0, 0x8a, 0x21, 0x8c, 0xb6, 0x66,
105 0xca, 0x47, 0x10, 0x30, 0x3b, 0x48, 0x58, 0x64, 0x1e, 0x61, 0x0b, 0xa6,
106 0xba, 0x61, 0x3d, 0x21, 0x27, 0x03, 0xf5, 0xf7, 0xc0, 0x7c, 0x23, 0x4f,
107 0xc0, 0x42, 0x01, 0xf0, 0x8e, 0x20, 0xe8, 0xfd, 0xd5, 0xc1, 0x66, 0x0d,
108 0x8d, 0x0c, 0x4c, 0x68, 0x3b, 0xca, 0x89, 0x62, 0xcc, 0xe6, 0x34, 0x39,
109 0x31, 0x37, 0xb7, 0x20, 0x79, 0xfa, 0x1a, 0x41, 0xd9, 0xdb, 0xc0, 0x3a,
110 0x44, 0x7d, 0xa4, 0x30, 0x02, 0x60, 0x60, 0x45, 0x83, 0x8e, 0x6a, 0x51,
111 0x90, 0xed, 0x00, 0xd4, 0x14, 0xc6, 0x8e, 0xe4, 0xf6, 0xe7, 0x47, 0x44,
112 0xeb, 0xc3, 0x64, 0x58, 0x97, 0xba, 0x1a, 0x4d, 0xbc, 0xc1, 0xc1, 0x24,
113 0xf4, 0x85, 0x1b, 0x04, 0xb9, 0x98, 0xb9, 0x08, 0xa5, 0x7d, 0x9f, 0x19,
114 0xc2, 0x70, 0x20, 0x15, 0xa5, 0xc0, 0x3a, 0x5c, 0xfc, 0x06, 0xe0, 0x0e,
115 0x8e, 0x35, 0xdd, 0xa7, 0x0f, 0x78, 0xc3, 0x11, 0x30, 0x66, 0xde, 0x7f,
116 0x0c, 0x1a, 0x28, 0x04, 0x01, 0xe1, 0x78, 0x92, 0x67, 0xbb, 0xe3, 0x51,
117 0x63, 0x89, 0xe0, 0x1d, 0x2c, 0x87, 0xfa, 0xda, 0x25, 0x01, 0x8d, 0x56,
118 0xda, 0xff, 0x7f, 0x34, 0xf0, 0xf7, 0x05, 0x8b, 0xc9, 0x8f, 0xc0, 0x3a,
119 0x6c, 0xfc, 0x08, 0x60, 0x0e, 0x96, 0x38, 0xd7, 0xa3, 0x30, 0x1a, 0x8d,
120 0xbd, 0x2d, 0x30, 0xc1, 0x76, 0x0a, 0xe7, 0x03, 0x84, 0x12, 0x1f, 0x7e,
121 0xd3, 0xfa, 0x25, 0x99, 0x97, 0x5c, 0xc8, 0xd2, 0xc3, 0x4a, 0xa5, 0xcc,
122 0xb4, 0xd9, 0x72, 0x75, 0x02, 0x3c, 0xef, 0xa6, 0x44, 0x4f, 0x93, 0x3f,
123 0xf5, 0x36, 0xc8, 0x06, 0x34, 0x9e, 0xa9, 0x86, 0xdd, 0x30, 0x9f, 0x60,
124 0xf7, 0x92, 0x2f, 0xc0, 0x15, 0x31, 0xf6, 0x94, 0x40, 0x0a, 0xa0, 0x2e,
125 0x67, 0x19, 0xa4, 0xc9, 0x7a, 0xe6, 0x62, 0xcb, 0x67, 0x6a, 0xaa, 0xed,
126 0xdf, 0x37, 0x23, 0xda, 0x88, 0xd5, 0xd4, 0xe0, 0x00, 0xc1, 0xbc, 0xfa,
127 0xee, 0x8c, 0x02, 0xfc, 0x4e, 0xed, 0x1f, 0x16, 0x6d, 0x88, 0xf7, 0x5b,
128 0x55, 0xd6, 0x85, 0x9f, 0x74, 0x77, 0xa3, 0xa4, 0xbf, 0xa0, 0xbb, 0x9f,
129 0x19, 0xca, 0xfa, 0xc7, 0x73, 0xc8, 0x80, 0xd8, 0x66, 0xef, 0xc0, 0x3a,
130 0x64, 0xfc, 0x07, 0x20, 0x04, 0xa0, 0x62, 0x58, 0xac, 0x18, 0x55, 0x48,
131 0x17, 0x3c, 0xf1, 0xb0, 0x66, 0x6f, 0x00, 0xd4, 0xb9, 0xf7, 0xff, 0x6c,
132 0xb9, 0x5b, 0xa0, 0x0d, 0xe6, 0xe0, 0xce, 0x1e, 0xbb, 0x5a, 0x47, 0x30,
133 0xe0, 0x58, 0x79, 0xb1, 0xc0, 0x04, 0xd8, 0xba, 0x17, 0xbf, 0x62, 0x09,
134 0xb3, 0xa6, 0x72, 0xc0, 0x15, 0xb3, 0xf0, 0x25, 0x80, 0x13, 0x80, 0x1e,
135 0xeb, 0xfa, 0xc6, 0xf2, 0x99, 0xf7, 0x54, 0x75, 0xaf, 0x5c, 0xc7, 0x62,
136 0x66, 0xae, 0x3d, 0xfb, 0xae, 0x34, 0xeb, 0xb5, 0xac, 0x00, 0x01, 0x9f,
137 0x4c, 0x72, 0x25, 0x30, 0xd0, 0x8b, 0x45, 0x1b, 0x19, 0xce, 0x05, 0x96,
138 0xb1, 0x9c, 0xd8, 0x34, 0x22, 0x66, 0xc7, 0x19, 0x76, 0x65, 0x41, 0x25,
139 0xbd, 0x03, 0x84, 0xb9, 0x68, 0xd4, 0x8a, 0x2f, 0xff, 0xd9
140 };
141
142 unsigned char rgb_32_32_j2c[] = { 0x00, 0x00, 0x02, 0xd6, 0x6a, 0x70, 0x32,
143 0x63, 0xff, 0x4f, 0xff, 0x51, 0x00, 0x2f, 0x00, 0x00, 0x00, 0x00, 0x00,
144 0x20, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
145 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
146 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x01, 0x01, 0x07, 0x01,
147 0x01, 0x07, 0x01, 0x01, 0xff, 0x52, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x01,
148 0x01, 0x05, 0x04, 0x04, 0x00, 0x01, 0xff, 0x5c, 0x00, 0x13, 0x40, 0x40,
149 0x48, 0x48, 0x50, 0x48, 0x48, 0x50, 0x48, 0x48, 0x50, 0x48, 0x48, 0x50,
150 0x48, 0x48, 0x50, 0xff, 0x64, 0x00, 0x25, 0x00, 0x01, 0x43, 0x72, 0x65,
151 0x61, 0x74, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x4f, 0x70, 0x65, 0x6e,
152 0x4a, 0x50, 0x45, 0x47, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
153 0x20, 0x32, 0x2e, 0x33, 0x2e, 0x31, 0xff, 0x90, 0x00, 0x0a, 0x00, 0x00,
154 0x00, 0x00, 0x02, 0x4f, 0x00, 0x01, 0xff, 0x93, 0xcf, 0xb4, 0x08, 0x03,
155 0x1f, 0xc3, 0xe7, 0x02, 0x08, 0xc1, 0xf2, 0x01, 0x00, 0xc0, 0x7c, 0x20,
156 0xc3, 0xea, 0x02, 0x80, 0x10, 0x80, 0x09, 0x07, 0x3f, 0x07, 0xc0, 0x7c,
157 0x20, 0xcf, 0xc0, 0x0a, 0x07, 0xce, 0x08, 0x05, 0x02, 0xef, 0x00, 0x7f,
158 0xc0, 0x3a, 0x0c, 0x0f, 0x90, 0x0c, 0x03, 0xe1, 0x04, 0x01, 0x00, 0x09,
159 0xc0, 0x7c, 0x21, 0xc0, 0xf9, 0x02, 0x40, 0x3e, 0x10, 0xc0, 0x10, 0x9a,
160 0x7f, 0x0d, 0xfa, 0x01, 0x7f, 0x10, 0x93, 0x7f, 0xc0, 0xf9, 0x01, 0xc7,
161 0xda, 0x0b, 0x01, 0xf2, 0x04, 0x0e, 0x41, 0x06, 0x08, 0xd9, 0xee, 0x60,
162 0x07, 0x0d, 0x72, 0x91, 0xbf, 0xc0, 0x7c, 0x21, 0xcf, 0xc0, 0x1a, 0x03,
163 0xe4, 0x06, 0x0d, 0x93, 0x4f, 0x0c, 0x17, 0xac, 0x9f, 0xc7, 0x3f, 0x0d,
164 0x8e, 0x7f, 0xc0, 0x3a, 0x2c, 0xfc, 0x03, 0xe0, 0x0e, 0x8c, 0x16, 0xa3,
165 0xbe, 0xff, 0x6f, 0x00, 0xcf, 0xca, 0xc7, 0x45, 0x46, 0x09, 0x8f, 0xcd,
166 0x8e, 0x86, 0x17, 0x84, 0x9d, 0x4c, 0x24, 0xa5, 0xd4, 0x77, 0xac, 0x3f,
167 0xc0, 0x7c, 0x23, 0x4f, 0xc0, 0x36, 0x01, 0xf0, 0x8a, 0x21, 0x8c, 0xb6,
168 0x66, 0xca, 0x47, 0x10, 0x30, 0x3b, 0x48, 0x58, 0x64, 0x1e, 0x61, 0x0b,
169 0xa6, 0xba, 0x61, 0x3d, 0x21, 0x27, 0x03, 0xf5, 0xf7, 0xc0, 0x7c, 0x23,
170 0x4f, 0xc0, 0x42, 0x01, 0xf0, 0x8e, 0x20, 0xe8, 0xfd, 0xd5, 0xc1, 0x66,
171 0x0d, 0x8d, 0x0c, 0x4c, 0x68, 0x3b, 0xca, 0x89, 0x62, 0xcc, 0xe6, 0x34,
172 0x39, 0x31, 0x37, 0xb7, 0x20, 0x79, 0xfa, 0x1a, 0x41, 0xd9, 0xdb, 0xc0,
173 0x3a, 0x44, 0x7d, 0xa4, 0x30, 0x02, 0x60, 0x60, 0x45, 0x83, 0x8e, 0x6a,
174 0x51, 0x90, 0xed, 0x00, 0xd4, 0x14, 0xc6, 0x8e, 0xe4, 0xf6, 0xe7, 0x47,
175 0x44, 0xeb, 0xc3, 0x64, 0x58, 0x97, 0xba, 0x1a, 0x4d, 0xbc, 0xc1, 0xc1,
176 0x24, 0xf4, 0x85, 0x1b, 0x04, 0xb9, 0x98, 0xb9, 0x08, 0xa5, 0x7d, 0x9f,
177 0x19, 0xc2, 0x70, 0x20, 0x15, 0xa5, 0xc0, 0x3a, 0x5c, 0xfc, 0x06, 0xe0,
178 0x0e, 0x8e, 0x35, 0xdd, 0xa7, 0x0f, 0x78, 0xc3, 0x11, 0x30, 0x66, 0xde,
179 0x7f, 0x0c, 0x1a, 0x28, 0x04, 0x01, 0xe1, 0x78, 0x92, 0x67, 0xbb, 0xe3,
180 0x51, 0x63, 0x89, 0xe0, 0x1d, 0x2c, 0x87, 0xfa, 0xda, 0x25, 0x01, 0x8d,
181 0x56, 0xda, 0xff, 0x7f, 0x34, 0xf0, 0xf7, 0x05, 0x8b, 0xc9, 0x8f, 0xc0,
182 0x3a, 0x6c, 0xfc, 0x08, 0x60, 0x0e, 0x96, 0x38, 0xd7, 0xa3, 0x30, 0x1a,
183 0x8d, 0xbd, 0x2d, 0x30, 0xc1, 0x76, 0x0a, 0xe7, 0x03, 0x84, 0x12, 0x1f,
184 0x7e, 0xd3, 0xfa, 0x25, 0x99, 0x97, 0x5c, 0xc8, 0xd2, 0xc3, 0x4a, 0xa5,
185 0xcc, 0xb4, 0xd9, 0x72, 0x75, 0x02, 0x3c, 0xef, 0xa6, 0x44, 0x4f, 0x93,
186 0x3f, 0xf5, 0x36, 0xc8, 0x06, 0x34, 0x9e, 0xa9, 0x86, 0xdd, 0x30, 0x9f,
187 0x60, 0xf7, 0x92, 0x2f, 0xc0, 0x15, 0x31, 0xf6, 0x94, 0x40, 0x0a, 0xa0,
188 0x2e, 0x67, 0x19, 0xa4, 0xc9, 0x7a, 0xe6, 0x62, 0xcb, 0x67, 0x6a, 0xaa,
189 0xed, 0xdf, 0x37, 0x23, 0xda, 0x88, 0xd5, 0xd4, 0xe0, 0x00, 0xc1, 0xbc,
190 0xfa, 0xee, 0x8c, 0x02, 0xfc, 0x4e, 0xed, 0x1f, 0x16, 0x6d, 0x88, 0xf7,
191 0x5b, 0x55, 0xd6, 0x85, 0x9f, 0x74, 0x77, 0xa3, 0xa4, 0xbf, 0xa0, 0xbb,
192 0x9f, 0x19, 0xca, 0xfa, 0xc7, 0x73, 0xc8, 0x80, 0xd8, 0x66, 0xef, 0xc0,
193 0x3a, 0x64, 0xfc, 0x07, 0x20, 0x04, 0xa0, 0x62, 0x58, 0xac, 0x18, 0x55,
194 0x48, 0x17, 0x3c, 0xf1, 0xb0, 0x66, 0x6f, 0x00, 0xd4, 0xb9, 0xf7, 0xff,
195 0x6c, 0xb9, 0x5b, 0xa0, 0x0d, 0xe6, 0xe0, 0xce, 0x1e, 0xbb, 0x5a, 0x47,
196 0x30, 0xe0, 0x58, 0x79, 0xb1, 0xc0, 0x04, 0xd8, 0xba, 0x17, 0xbf, 0x62,
197 0x09, 0xb3, 0xa6, 0x72, 0xc0, 0x15, 0xb3, 0xf0, 0x25, 0x80, 0x13, 0x80,
198 0x1e, 0xeb, 0xfa, 0xc6, 0xf2, 0x99, 0xf7, 0x54, 0x75, 0xaf, 0x5c, 0xc7,
199 0x62, 0x66, 0xae, 0x3d, 0xfb, 0xae, 0x34, 0xeb, 0xb5, 0xac, 0x00, 0x01,
200 0x9f, 0x4c, 0x72, 0x25, 0x30, 0xd0, 0x8b, 0x45, 0x1b, 0x19, 0xce, 0x05,
201 0x96, 0xb1, 0x9c, 0xd8, 0x34, 0x22, 0x66, 0xc7, 0x19, 0x76, 0x65, 0x41,
202 0x25, 0xbd, 0x03, 0x84, 0xb9, 0x68, 0xd4, 0x8a, 0x2f, 0xff, 0xd9
203 };
204
205
206
207 unsigned char rgb_32_32_jp2[] = {
208 0x00, 0x00, 0x00, 0x0c, 0x6a, 0x50, 0x20, 0x20, 0x0d, 0x0a, 0x87, 0x0a,
209 0x00, 0x00, 0x00, 0x14, 0x66, 0x74, 0x79, 0x70, 0x6a, 0x70, 0x32, 0x20,
210 0x00, 0x00, 0x00, 0x00, 0x6a, 0x70, 0x32, 0x20, 0x00, 0x00, 0x00, 0x2d,
211 0x6a, 0x70, 0x32, 0x68, 0x00, 0x00, 0x00, 0x16, 0x69, 0x68, 0x64, 0x72,
212 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x00, 0x03, 0x07, 0x07,
213 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x63, 0x6f, 0x6c, 0x72, 0x01, 0x00,
214 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x02, 0xd6, 0x6a, 0x70, 0x32,
215 0x63, 0xff, 0x4f, 0xff, 0x51, 0x00, 0x2f, 0x00, 0x00, 0x00, 0x00, 0x00,
216 0x20, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
217 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
218 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x01, 0x01, 0x07, 0x01,
219 0x01, 0x07, 0x01, 0x01, 0xff, 0x52, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x01,
220 0x01, 0x05, 0x04, 0x04, 0x00, 0x01, 0xff, 0x5c, 0x00, 0x13, 0x40, 0x40,
221 0x48, 0x48, 0x50, 0x48, 0x48, 0x50, 0x48, 0x48, 0x50, 0x48, 0x48, 0x50,
222 0x48, 0x48, 0x50, 0xff, 0x64, 0x00, 0x25, 0x00, 0x01, 0x43, 0x72, 0x65,
223 0x61, 0x74, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x4f, 0x70, 0x65, 0x6e,
224 0x4a, 0x50, 0x45, 0x47, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
225 0x20, 0x32, 0x2e, 0x33, 0x2e, 0x31, 0xff, 0x90, 0x00, 0x0a, 0x00, 0x00,
226 0x00, 0x00, 0x02, 0x4f, 0x00, 0x01, 0xff, 0x93, 0xcf, 0xb4, 0x08, 0x03,
227 0x1f, 0xc3, 0xe7, 0x02, 0x08, 0xc1, 0xf2, 0x01, 0x00, 0xc0, 0x7c, 0x20,
228 0xc3, 0xea, 0x02, 0x80, 0x10, 0x80, 0x09, 0x07, 0x3f, 0x07, 0xc0, 0x7c,
229 0x20, 0xcf, 0xc0, 0x0a, 0x07, 0xce, 0x08, 0x05, 0x02, 0xef, 0x00, 0x7f,
230 0xc0, 0x3a, 0x0c, 0x0f, 0x90, 0x0c, 0x03, 0xe1, 0x04, 0x01, 0x00, 0x09,
231 0xc0, 0x7c, 0x21, 0xc0, 0xf9, 0x02, 0x40, 0x3e, 0x10, 0xc0, 0x10, 0x9a,
232 0x7f, 0x0d, 0xfa, 0x01, 0x7f, 0x10, 0x93, 0x7f, 0xc0, 0xf9, 0x01, 0xc7,
233 0xda, 0x0b, 0x01, 0xf2, 0x04, 0x0e, 0x41, 0x06, 0x08, 0xd9, 0xee, 0x60,
234 0x07, 0x0d, 0x72, 0x91, 0xbf, 0xc0, 0x7c, 0x21, 0xcf, 0xc0, 0x1a, 0x03,
235 0xe4, 0x06, 0x0d, 0x93, 0x4f, 0x0c, 0x17, 0xac, 0x9f, 0xc7, 0x3f, 0x0d,
236 0x8e, 0x7f, 0xc0, 0x3a, 0x2c, 0xfc, 0x03, 0xe0, 0x0e, 0x8c, 0x16, 0xa3,
237 0xbe, 0xff, 0x6f, 0x00, 0xcf, 0xca, 0xc7, 0x45, 0x46, 0x09, 0x8f, 0xcd,
238 0x8e, 0x86, 0x17, 0x84, 0x9d, 0x4c, 0x24, 0xa5, 0xd4, 0x77, 0xac, 0x3f,
239 0xc0, 0x7c, 0x23, 0x4f, 0xc0, 0x36, 0x01, 0xf0, 0x8a, 0x21, 0x8c, 0xb6,
240 0x66, 0xca, 0x47, 0x10, 0x30, 0x3b, 0x48, 0x58, 0x64, 0x1e, 0x61, 0x0b,
241 0xa6, 0xba, 0x61, 0x3d, 0x21, 0x27, 0x03, 0xf5, 0xf7, 0xc0, 0x7c, 0x23,
242 0x4f, 0xc0, 0x42, 0x01, 0xf0, 0x8e, 0x20, 0xe8, 0xfd, 0xd5, 0xc1, 0x66,
243 0x0d, 0x8d, 0x0c, 0x4c, 0x68, 0x3b, 0xca, 0x89, 0x62, 0xcc, 0xe6, 0x34,
244 0x39, 0x31, 0x37, 0xb7, 0x20, 0x79, 0xfa, 0x1a, 0x41, 0xd9, 0xdb, 0xc0,
245 0x3a, 0x44, 0x7d, 0xa4, 0x30, 0x02, 0x60, 0x60, 0x45, 0x83, 0x8e, 0x6a,
246 0x51, 0x90, 0xed, 0x00, 0xd4, 0x14, 0xc6, 0x8e, 0xe4, 0xf6, 0xe7, 0x47,
247 0x44, 0xeb, 0xc3, 0x64, 0x58, 0x97, 0xba, 0x1a, 0x4d, 0xbc, 0xc1, 0xc1,
248 0x24, 0xf4, 0x85, 0x1b, 0x04, 0xb9, 0x98, 0xb9, 0x08, 0xa5, 0x7d, 0x9f,
249 0x19, 0xc2, 0x70, 0x20, 0x15, 0xa5, 0xc0, 0x3a, 0x5c, 0xfc, 0x06, 0xe0,
250 0x0e, 0x8e, 0x35, 0xdd, 0xa7, 0x0f, 0x78, 0xc3, 0x11, 0x30, 0x66, 0xde,
251 0x7f, 0x0c, 0x1a, 0x28, 0x04, 0x01, 0xe1, 0x78, 0x92, 0x67, 0xbb, 0xe3,
252 0x51, 0x63, 0x89, 0xe0, 0x1d, 0x2c, 0x87, 0xfa, 0xda, 0x25, 0x01, 0x8d,
253 0x56, 0xda, 0xff, 0x7f, 0x34, 0xf0, 0xf7, 0x05, 0x8b, 0xc9, 0x8f, 0xc0,
254 0x3a, 0x6c, 0xfc, 0x08, 0x60, 0x0e, 0x96, 0x38, 0xd7, 0xa3, 0x30, 0x1a,
255 0x8d, 0xbd, 0x2d, 0x30, 0xc1, 0x76, 0x0a, 0xe7, 0x03, 0x84, 0x12, 0x1f,
256 0x7e, 0xd3, 0xfa, 0x25, 0x99, 0x97, 0x5c, 0xc8, 0xd2, 0xc3, 0x4a, 0xa5,
257 0xcc, 0xb4, 0xd9, 0x72, 0x75, 0x02, 0x3c, 0xef, 0xa6, 0x44, 0x4f, 0x93,
258 0x3f, 0xf5, 0x36, 0xc8, 0x06, 0x34, 0x9e, 0xa9, 0x86, 0xdd, 0x30, 0x9f,
259 0x60, 0xf7, 0x92, 0x2f, 0xc0, 0x15, 0x31, 0xf6, 0x94, 0x40, 0x0a, 0xa0,
260 0x2e, 0x67, 0x19, 0xa4, 0xc9, 0x7a, 0xe6, 0x62, 0xcb, 0x67, 0x6a, 0xaa,
261 0xed, 0xdf, 0x37, 0x23, 0xda, 0x88, 0xd5, 0xd4, 0xe0, 0x00, 0xc1, 0xbc,
262 0xfa, 0xee, 0x8c, 0x02, 0xfc, 0x4e, 0xed, 0x1f, 0x16, 0x6d, 0x88, 0xf7,
263 0x5b, 0x55, 0xd6, 0x85, 0x9f, 0x74, 0x77, 0xa3, 0xa4, 0xbf, 0xa0, 0xbb,
264 0x9f, 0x19, 0xca, 0xfa, 0xc7, 0x73, 0xc8, 0x80, 0xd8, 0x66, 0xef, 0xc0,
265 0x3a, 0x64, 0xfc, 0x07, 0x20, 0x04, 0xa0, 0x62, 0x58, 0xac, 0x18, 0x55,
266 0x48, 0x17, 0x3c, 0xf1, 0xb0, 0x66, 0x6f, 0x00, 0xd4, 0xb9, 0xf7, 0xff,
267 0x6c, 0xb9, 0x5b, 0xa0, 0x0d, 0xe6, 0xe0, 0xce, 0x1e, 0xbb, 0x5a, 0x47,
268 0x30, 0xe0, 0x58, 0x79, 0xb1, 0xc0, 0x04, 0xd8, 0xba, 0x17, 0xbf, 0x62,
269 0x09, 0xb3, 0xa6, 0x72, 0xc0, 0x15, 0xb3, 0xf0, 0x25, 0x80, 0x13, 0x80,
270 0x1e, 0xeb, 0xfa, 0xc6, 0xf2, 0x99, 0xf7, 0x54, 0x75, 0xaf, 0x5c, 0xc7,
271 0x62, 0x66, 0xae, 0x3d, 0xfb, 0xae, 0x34, 0xeb, 0xb5, 0xac, 0x00, 0x01,
272 0x9f, 0x4c, 0x72, 0x25, 0x30, 0xd0, 0x8b, 0x45, 0x1b, 0x19, 0xce, 0x05,
273 0x96, 0xb1, 0x9c, 0xd8, 0x34, 0x22, 0x66, 0xc7, 0x19, 0x76, 0x65, 0x41,
274 0x25, 0xbd, 0x03, 0x84, 0xb9, 0x68, 0xd4, 0x8a, 0x2f, 0xff, 0xd9
275 };
276
277
278 unsigned char mono_32_32_j2k[] = {
279 0xff, 0x4f, 0xff, 0x51, 0x00, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20,
280 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
281 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00,
282 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x01, 0xff, 0x52, 0x00,
283 0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x05, 0x04, 0x04, 0x00, 0x01, 0xff,
284 0x5c, 0x00, 0x13, 0x40, 0x08, 0x10, 0x10, 0x18, 0x10, 0x10, 0x18, 0x10,
285 0x10, 0x18, 0x10, 0x10, 0x18, 0x10, 0x10, 0x18, 0xff, 0x64, 0x00, 0x25,
286 0x00, 0x01, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x62, 0x79,
287 0x20, 0x4f, 0x70, 0x65, 0x6e, 0x4a, 0x50, 0x45, 0x47, 0x20, 0x76, 0x65,
288 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x32, 0x2e, 0x33, 0x2e, 0x31, 0xff,
289 0x90, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7d, 0x00, 0x01, 0xff,
290 0x93, 0xd0, 0x80, 0x03, 0xdd, 0x06, 0x43, 0x10, 0x80, 0x07, 0x07, 0x07,
291 0xa4, 0x53, 0xa1, 0x00, 0x02, 0x7f, 0x0e, 0x1e, 0xc8, 0xe4, 0x93, 0xa2,
292 0x80, 0x02, 0xc3, 0xe6, 0x14, 0x37, 0x8d, 0x15, 0x21, 0xb8, 0x50, 0x11,
293 0xf7, 0xca, 0xc9, 0x53, 0x13, 0x80, 0x0e, 0x38, 0x92, 0x1b, 0x0b, 0x8e,
294 0xb9, 0x57, 0x24, 0x4a, 0xff, 0x7f, 0x17, 0xde, 0x06, 0x1c, 0xc9, 0x2f,
295 0xe3, 0x94, 0xc7, 0x19, 0xb2, 0x78, 0xe2, 0x5c, 0x6f, 0xbf, 0xca, 0xd9,
296 0x55, 0x15, 0xc0, 0x19, 0x19, 0xe7, 0xf6, 0x16, 0x44, 0xa0, 0xe4, 0xd4,
297 0xfd, 0x27, 0x7f, 0x3f, 0x1b, 0xc6, 0x55, 0x2d, 0xd2, 0x09, 0xed, 0xae,
298 0xb8, 0xa5, 0x1b, 0xc0, 0x89, 0xc8, 0x0a, 0x0d, 0x70, 0xa7, 0x86, 0x78,
299 0x2d, 0xd1, 0x66, 0xd1, 0xff, 0xd9
300 };
301
302 unsigned char mono_32_32_j2c[] = {
303 0x00, 0x00, 0x00, 0xfe, 0x6a, 0x70, 0x32,
304 0x63, 0xff, 0x4f, 0xff, 0x51, 0x00, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00,
305 0x20, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
306 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
307 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x01, 0xff, 0x52,
308 0x00, 0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x05, 0x04, 0x04, 0x00, 0x01,
309 0xff, 0x5c, 0x00, 0x13, 0x40, 0x08, 0x10, 0x10, 0x18, 0x10, 0x10, 0x18,
310 0x10, 0x10, 0x18, 0x10, 0x10, 0x18, 0x10, 0x10, 0x18, 0xff, 0x64, 0x00,
311 0x25, 0x00, 0x01, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x62,
312 0x79, 0x20, 0x4f, 0x70, 0x65, 0x6e, 0x4a, 0x50, 0x45, 0x47, 0x20, 0x76,
313 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x32, 0x2e, 0x33, 0x2e, 0x31,
314 0xff, 0x90, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7d, 0x00, 0x01,
315 0xff, 0x93, 0xd0, 0x80, 0x03, 0xdd, 0x06, 0x43, 0x10, 0x80, 0x07, 0x07,
316 0x07, 0xa4, 0x53, 0xa1, 0x00, 0x02, 0x7f, 0x0e, 0x1e, 0xc8, 0xe4, 0x93,
317 0xa2, 0x80, 0x02, 0xc3, 0xe6, 0x14, 0x37, 0x8d, 0x15, 0x21, 0xb8, 0x50,
318 0x11, 0xf7, 0xca, 0xc9, 0x53, 0x13, 0x80, 0x0e, 0x38, 0x92, 0x1b, 0x0b,
319 0x8e, 0xb9, 0x57, 0x24, 0x4a, 0xff, 0x7f, 0x17, 0xde, 0x06, 0x1c, 0xc9,
320 0x2f, 0xe3, 0x94, 0xc7, 0x19, 0xb2, 0x78, 0xe2, 0x5c, 0x6f, 0xbf, 0xca,
321 0xd9, 0x55, 0x15, 0xc0, 0x19, 0x19, 0xe7, 0xf6, 0x16, 0x44, 0xa0, 0xe4,
322 0xd4, 0xfd, 0x27, 0x7f, 0x3f, 0x1b, 0xc6, 0x55, 0x2d, 0xd2, 0x09, 0xed,
323 0xae, 0xb8, 0xa5, 0x1b, 0xc0, 0x89, 0xc8, 0x0a, 0x0d, 0x70, 0xa7, 0x86,
324 0x78, 0x2d, 0xd1, 0x66, 0xd1, 0xff, 0xd9
325 };
326
327 unsigned char mono_32_32_jp2[] = {
328 0x00, 0x00, 0x00, 0x0c, 0x6a, 0x50, 0x20, 0x20, 0x0d, 0x0a, 0x87, 0x0a,
329 0x00, 0x00, 0x00, 0x14, 0x66, 0x74, 0x79, 0x70, 0x6a, 0x70, 0x32, 0x20,
330 0x00, 0x00, 0x00, 0x00, 0x6a, 0x70, 0x32, 0x20, 0x00, 0x00, 0x00, 0x2d,
331 0x6a, 0x70, 0x32, 0x68, 0x00, 0x00, 0x00, 0x16, 0x69, 0x68, 0x64, 0x72,
332 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x00, 0x01, 0x00, 0x07,
333 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x63, 0x6f, 0x6c, 0x72, 0x01, 0x00,
334 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0xfe, 0x6a, 0x70, 0x32,
335 0x63, 0xff, 0x4f, 0xff, 0x51, 0x00, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00,
336 0x20, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
337 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
338 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x01, 0xff, 0x52,
339 0x00, 0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x05, 0x04, 0x04, 0x00, 0x01,
340 0xff, 0x5c, 0x00, 0x13, 0x40, 0x08, 0x10, 0x10, 0x18, 0x10, 0x10, 0x18,
341 0x10, 0x10, 0x18, 0x10, 0x10, 0x18, 0x10, 0x10, 0x18, 0xff, 0x64, 0x00,
342 0x25, 0x00, 0x01, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x62,
343 0x79, 0x20, 0x4f, 0x70, 0x65, 0x6e, 0x4a, 0x50, 0x45, 0x47, 0x20, 0x76,
344 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x32, 0x2e, 0x33, 0x2e, 0x31,
345 0xff, 0x90, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7d, 0x00, 0x01,
346 0xff, 0x93, 0xd0, 0x80, 0x03, 0xdd, 0x06, 0x43, 0x10, 0x80, 0x07, 0x07,
347 0x07, 0xa4, 0x53, 0xa1, 0x00, 0x02, 0x7f, 0x0e, 0x1e, 0xc8, 0xe4, 0x93,
348 0xa2, 0x80, 0x02, 0xc3, 0xe6, 0x14, 0x37, 0x8d, 0x15, 0x21, 0xb8, 0x50,
349 0x11, 0xf7, 0xca, 0xc9, 0x53, 0x13, 0x80, 0x0e, 0x38, 0x92, 0x1b, 0x0b,
350 0x8e, 0xb9, 0x57, 0x24, 0x4a, 0xff, 0x7f, 0x17, 0xde, 0x06, 0x1c, 0xc9,
351 0x2f, 0xe3, 0x94, 0xc7, 0x19, 0xb2, 0x78, 0xe2, 0x5c, 0x6f, 0xbf, 0xca,
352 0xd9, 0x55, 0x15, 0xc0, 0x19, 0x19, 0xe7, 0xf6, 0x16, 0x44, 0xa0, 0xe4,
353 0xd4, 0xfd, 0x27, 0x7f, 0x3f, 0x1b, 0xc6, 0x55, 0x2d, 0xd2, 0x09, 0xed,
354 0xae, 0xb8, 0xa5, 0x1b, 0xc0, 0x89, 0xc8, 0x0a, 0x0d, 0x70, 0xa7, 0x86,
355 0x78, 0x2d, 0xd1, 0x66, 0xd1, 0xff, 0xd9
356 };
357
358 static gboolean
verify_buffer(buffer_verify_data_s * vdata,GstBuffer * buffer)359 verify_buffer (buffer_verify_data_s * vdata, GstBuffer * buffer)
360 {
361 if (!vdata->discard) {
362 GstMapInfo map;
363 if (gst_buffer_map (buffer, &map, GST_MAP_READ)) {
364 if (ctx_sink_template == &sinktemplate_mono_jpc &&
365 ctx_src_template == &srctemplate_j2c) {
366 fail_unless (map.size == jpge2000_codec_data_size - 8);
367 }
368 gst_buffer_unmap (buffer, &map);
369 }
370 return TRUE;
371 }
372
373 return FALSE;
374 }
375
GST_START_TEST(test_parse_normal)376 GST_START_TEST (test_parse_normal)
377 {
378 gst_parser_test_normal (jpeg2000_codec_data, jpge2000_codec_data_size);
379 }
380
381 GST_END_TEST;
382
383 static Suite *
jpeg2000parse_suite(const char * suite_name)384 jpeg2000parse_suite (const char *suite_name)
385 {
386 Suite *s = suite_create (suite_name);
387 TCase *tc_chain = tcase_create ("general");
388
389 suite_add_tcase (s, tc_chain);
390 tcase_add_test (tc_chain, test_parse_normal);
391 return s;
392 }
393
394 static int
run_test_suite(guint8 * data,gsize size,GstStaticPadTemplate * src_templ,GstStaticPadTemplate * sink_templ,const gchar * name)395 run_test_suite (guint8 * data, gsize size,
396 GstStaticPadTemplate * src_templ, GstStaticPadTemplate * sink_templ,
397 const gchar * name)
398 {
399 Suite *s;
400
401 ctx_sink_template = sink_templ;
402 ctx_src_template = src_templ;
403 jpeg2000_codec_data = data;
404 jpge2000_codec_data_size = size;
405 s = jpeg2000parse_suite (name);
406 return gst_check_run_suite (s, name, __FILE__ "_normal.c");
407 }
408
409 int
main(int argc,char ** argv)410 main (int argc, char **argv)
411 {
412 int nf = 0;
413
414 gst_check_init (&argc, &argv);
415
416 ctx_factory = "jpeg2000parse";
417 ctx_no_metadata = TRUE;
418 ctx_frame_generated = FALSE;
419
420 nf +=
421 run_test_suite (mono_32_32_j2k, sizeof (mono_32_32_j2k), &srctemplate_jpc,
422 &sinktemplate_mono_jpc, "mono jpc to jpc");
423 nf +=
424 run_test_suite (rgb_32_32_j2k, sizeof (rgb_32_32_j2k), &srctemplate_jpc,
425 &sinktemplate_rgb_jpc, "rgb jpc to jpc");
426 nf +=
427 run_test_suite (mono_32_32_j2c, sizeof (mono_32_32_j2c), &srctemplate_j2c,
428 &sinktemplate_mono_j2c, "mono j2c to j2c");
429 nf +=
430 run_test_suite (rgb_32_32_j2c, sizeof (rgb_32_32_j2c), &srctemplate_j2c,
431 &sinktemplate_rgb_j2c, "rgb j2c to j2c");
432
433
434 /* downstream buffer size may differ from upstream size in the following tests */
435 ctx_verify_buffer = verify_buffer;
436 nf +=
437 run_test_suite (mono_32_32_j2c, sizeof (mono_32_32_j2c), &srctemplate_j2c,
438 &sinktemplate_mono_jpc, "mono j2c to jpc");
439 nf +=
440 run_test_suite (rgb_32_32_j2c, sizeof (rgb_32_32_j2c), &srctemplate_j2c,
441 &sinktemplate_rgb_jpc, "rgb j2c to jpc");
442 nf +=
443 run_test_suite (mono_32_32_jp2, sizeof (mono_32_32_jp2), &srctemplate_jp2,
444 &sinktemplate_mono_jpc, "mono jp2 to jpc");
445 nf +=
446 run_test_suite (rgb_32_32_jp2, sizeof (rgb_32_32_jp2), &srctemplate_jp2,
447 &sinktemplate_rgb_jpc, "rgb jp2 to jpc");
448 nf +=
449 run_test_suite (mono_32_32_jp2, sizeof (mono_32_32_jp2), &srctemplate_jp2,
450 &sinktemplate_mono_j2c, "mono jp2 to j2c");
451 nf +=
452 run_test_suite (rgb_32_32_jp2, sizeof (rgb_32_32_jp2), &srctemplate_jp2,
453 &sinktemplate_rgb_j2c, "rgb jp2 to j2c");
454
455
456 return nf;
457 }
458