MCPcopy Create free account
hub / github.com/davisking/dlib / transencode_master_selection

Function transencode_master_selection

dlib/external/libjpeg/jctrans.c:180–210  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

178 */
179
180LOCAL(void)
181transencode_master_selection (j_compress_ptr cinfo,
182 jvirt_barray_ptr * coef_arrays)
183{
184 /* Do computations that are needed before master selection phase */
185 jpeg_calc_trans_dimensions(cinfo);
186
187 /* Initialize master control (includes parameter checking/processing) */
188 jinit_c_master_control(cinfo, TRUE /* transcode only */);
189
190 /* Entropy encoding: either Huffman or arithmetic coding. */
191 if (cinfo->arith_code)
192 jinit_arith_encoder(cinfo);
193 else {
194 jinit_huff_encoder(cinfo);
195 }
196
197 /* We need a special coefficient buffer controller. */
198 transencode_coef_controller(cinfo, coef_arrays);
199
200 jinit_marker_writer(cinfo);
201
202 /* We can now tell the memory manager to allocate virtual arrays. */
203 (*cinfo->mem->realize_virt_arrays) ((j_common_ptr) cinfo);
204
205 /* Write the datastream header (SOI, JFIF) immediately.
206 * Frame and scan headers are postponed till later.
207 * This lets application insert special markers after the SOI.
208 */
209 (*cinfo->marker->write_file_header) (cinfo);
210}
211
212
213/*

Callers 1

jpeg_write_coefficientsFunction · 0.85

Calls 6

jinit_c_master_controlFunction · 0.85
jinit_arith_encoderFunction · 0.85
jinit_huff_encoderFunction · 0.85
jinit_marker_writerFunction · 0.85

Tested by

no test coverage detected