Lines Matching refs:cinfo
431 jpeg_compress_struct cinfo = {}; in encodeJpegYU12() local
438 cinfo.err = jpeg_std_error(&jerr); in encodeJpegYU12()
440 cinfo.err->output_message = [](j_common_ptr cinfo) { in encodeJpegYU12() argument
444 (*cinfo->err->format_message)(cinfo, buffer); in encodeJpegYU12()
447 cinfo.err->error_exit = [](j_common_ptr cinfo) { in encodeJpegYU12() argument
448 (*cinfo->err->output_message)(cinfo); in encodeJpegYU12()
449 if(cinfo->client_data) { in encodeJpegYU12()
451 *reinterpret_cast<CustomJpegDestMgr*>(cinfo->client_data); in encodeJpegYU12()
456 jpeg_create_compress(&cinfo); in encodeJpegYU12()
463 cinfo.client_data = static_cast<void*>(&dmgr); in encodeJpegYU12()
467 dmgr.mgr.init_destination = [](j_compress_ptr cinfo) { in encodeJpegYU12() argument
468 auto & dmgr = reinterpret_cast<CustomJpegDestMgr&>(*cinfo->dest); in encodeJpegYU12()
475 dmgr.mgr.empty_output_buffer = [](j_compress_ptr cinfo __unused) { in encodeJpegYU12()
480 dmgr.mgr.term_destination = [](j_compress_ptr cinfo) { in encodeJpegYU12() argument
481 auto & dmgr = reinterpret_cast<CustomJpegDestMgr&>(*cinfo->dest); in encodeJpegYU12()
485 cinfo.dest = reinterpret_cast<struct jpeg_destination_mgr*>(&dmgr); in encodeJpegYU12()
490 cinfo.image_width = inSz.width; in encodeJpegYU12()
491 cinfo.image_height = inSz.height; in encodeJpegYU12()
492 cinfo.input_components = 3; in encodeJpegYU12()
493 cinfo.in_color_space = JCS_YCbCr; in encodeJpegYU12()
496 jpeg_set_defaults(&cinfo); in encodeJpegYU12()
498 jpeg_set_quality(&cinfo, jpegQuality, 1); in encodeJpegYU12()
499 jpeg_set_colorspace(&cinfo, JCS_YCbCr); in encodeJpegYU12()
500 cinfo.raw_data_in = 1; in encodeJpegYU12()
501 cinfo.dct_method = JDCT_IFAST; in encodeJpegYU12()
507 cinfo.comp_info[0].h_samp_factor = 2; in encodeJpegYU12()
508 cinfo.comp_info[0].v_samp_factor = 2; in encodeJpegYU12()
509 cinfo.comp_info[1].h_samp_factor = 1; in encodeJpegYU12()
510 cinfo.comp_info[1].v_samp_factor = 1; in encodeJpegYU12()
511 cinfo.comp_info[2].h_samp_factor = 1; in encodeJpegYU12()
512 cinfo.comp_info[2].v_samp_factor = 1; in encodeJpegYU12()
516 cinfo.comp_info[0].v_samp_factor, in encodeJpegYU12()
517 cinfo.comp_info[1].v_samp_factor, in encodeJpegYU12()
518 cinfo.comp_info[2].v_samp_factor in encodeJpegYU12()
520 int cVSubSampling = cinfo.comp_info[0].v_samp_factor / in encodeJpegYU12()
521 cinfo.comp_info[1].v_samp_factor; in encodeJpegYU12()
524 jpeg_start_compress(&cinfo, TRUE); in encodeJpegYU12()
560 jpeg_write_marker(&cinfo, JPEG_APP0 + 1, in encodeJpegYU12()
566 while (cinfo.next_scanline < cinfo.image_height) { in encodeJpegYU12()
568 const uint32_t nl = cinfo.next_scanline; in encodeJpegYU12()
573 uint32_t done = jpeg_write_raw_data(&cinfo, planes, batchSize); in encodeJpegYU12()
577 __FUNCTION__, done, batchSize, cinfo.next_scanline, in encodeJpegYU12()
578 cinfo.image_height); in encodeJpegYU12()
584 jpeg_finish_compress(&cinfo); in encodeJpegYU12()