Lines Matching defs:pbc
88 static void jpeg_put_marker(PutByteContext *pbc, int code)
90 bytestream2_put_byte(pbc, 0xff);
91 bytestream2_put_byte(pbc, code);
98 PutByteContext pbc;
102 bytestream2_init_writer(&pbc, buf, size);
109 jpeg_put_marker(&pbc, SOI);
112 jpeg_put_marker(&pbc, APP0);
113 bytestream2_put_be16(&pbc, 16);
114 bytestream2_put_buffer(&pbc, "JFIF", 5);
115 bytestream2_put_be16(&pbc, 0x0102);
116 bytestream2_put_byte(&pbc, 0);
117 bytestream2_put_be16(&pbc, 1);
118 bytestream2_put_be16(&pbc, 1);
119 bytestream2_put_byte(&pbc, 0);
120 bytestream2_put_byte(&pbc, 0);
123 jpeg_put_marker(&pbc, DRI);
124 bytestream2_put_be16(&pbc, 4);
125 bytestream2_put_be16(&pbc, dri);
129 jpeg_put_marker(&pbc, DQT);
130 bytestream2_put_be16(&pbc, 2 + nb_qtable * (1 + 64));
133 bytestream2_put_byte(&pbc, i);
138 bytestream2_put_buffer(&pbc, qtable + 64 * i, 64);
142 jpeg_put_marker(&pbc, DHT);
143 dht_size_ptr = pbc.buffer;
144 bytestream2_put_be16(&pbc, 0);
147 dht_size += jpeg_create_huffman_table(&pbc, 0, 0,ff_mjpeg_bits_dc_luminance,
149 dht_size += jpeg_create_huffman_table(&pbc, 0, 1, ff_mjpeg_bits_dc_chrominance,
151 dht_size += jpeg_create_huffman_table(&pbc, 1, 0, ff_mjpeg_bits_ac_luminance,
153 dht_size += jpeg_create_huffman_table(&pbc, 1, 1, ff_mjpeg_bits_ac_chrominance,
158 jpeg_put_marker(&pbc, SOF0);
159 bytestream2_put_be16(&pbc, 17); /* size */
160 bytestream2_put_byte(&pbc, 8); /* bits per component */
161 bytestream2_put_be16(&pbc, h);
162 bytestream2_put_be16(&pbc, w);
163 bytestream2_put_byte(&pbc, 3); /* number of components */
164 bytestream2_put_byte(&pbc, 1); /* component number */
165 bytestream2_put_byte(&pbc, (2 << 4) | (type ? 2 : 1)); /* hsample/vsample */
166 bytestream2_put_byte(&pbc, 0); /* matrix number */
167 bytestream2_put_byte(&pbc, 2); /* component number */
168 bytestream2_put_byte(&pbc, 1 << 4 | 1); /* hsample/vsample */
169 bytestream2_put_byte(&pbc, nb_qtable == 2 ? 1 : 0); /* matrix number */
170 bytestream2_put_byte(&pbc, 3); /* component number */
171 bytestream2_put_byte(&pbc, 1 << 4 | 1); /* hsample/vsample */
172 bytestream2_put_byte(&pbc, nb_qtable == 2 ? 1 : 0); /* matrix number */
175 jpeg_put_marker(&pbc, SOS);
176 bytestream2_put_be16(&pbc, 12);
177 bytestream2_put_byte(&pbc, 3);
178 bytestream2_put_byte(&pbc, 1);
179 bytestream2_put_byte(&pbc, 0);
180 bytestream2_put_byte(&pbc, 2);
181 bytestream2_put_byte(&pbc, 17);
182 bytestream2_put_byte(&pbc, 3);
183 bytestream2_put_byte(&pbc, 17);
184 bytestream2_put_byte(&pbc, 0);
185 bytestream2_put_byte(&pbc, 63);
186 bytestream2_put_byte(&pbc, 0);
189 return bytestream2_tell_p(&pbc);