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