Lines Matching refs:cinfo
402 jpeg_compress_struct cinfo = {}; in encodeJpegYU12() local
409 cinfo.err = jpeg_std_error(&jerr); in encodeJpegYU12()
411 cinfo.err->output_message = [](j_common_ptr cinfo) { in encodeJpegYU12() argument
415 (*cinfo->err->format_message)(cinfo, buffer); in encodeJpegYU12()
418 cinfo.err->error_exit = [](j_common_ptr cinfo) { in encodeJpegYU12() argument
419 (*cinfo->err->output_message)(cinfo); in encodeJpegYU12()
420 if(cinfo->client_data) { in encodeJpegYU12()
422 *reinterpret_cast<CustomJpegDestMgr*>(cinfo->client_data); in encodeJpegYU12()
427 jpeg_create_compress(&cinfo); in encodeJpegYU12()
434 cinfo.client_data = static_cast<void*>(&dmgr); in encodeJpegYU12()
438 dmgr.mgr.init_destination = [](j_compress_ptr cinfo) { in encodeJpegYU12() argument
439 auto & dmgr = reinterpret_cast<CustomJpegDestMgr&>(*cinfo->dest); in encodeJpegYU12()
446 dmgr.mgr.empty_output_buffer = [](j_compress_ptr cinfo __unused) { in encodeJpegYU12()
451 dmgr.mgr.term_destination = [](j_compress_ptr cinfo) { in encodeJpegYU12() argument
452 auto & dmgr = reinterpret_cast<CustomJpegDestMgr&>(*cinfo->dest); in encodeJpegYU12()
456 cinfo.dest = reinterpret_cast<struct jpeg_destination_mgr*>(&dmgr); in encodeJpegYU12()
461 cinfo.image_width = inSz.width; in encodeJpegYU12()
462 cinfo.image_height = inSz.height; in encodeJpegYU12()
463 cinfo.input_components = 3; in encodeJpegYU12()
464 cinfo.in_color_space = JCS_YCbCr; in encodeJpegYU12()
467 jpeg_set_defaults(&cinfo); in encodeJpegYU12()
469 jpeg_set_quality(&cinfo, jpegQuality, 1); in encodeJpegYU12()
470 jpeg_set_colorspace(&cinfo, JCS_YCbCr); in encodeJpegYU12()
471 cinfo.raw_data_in = 1; in encodeJpegYU12()
472 cinfo.dct_method = JDCT_IFAST; in encodeJpegYU12()
478 cinfo.comp_info[0].h_samp_factor = 2; in encodeJpegYU12()
479 cinfo.comp_info[0].v_samp_factor = 2; in encodeJpegYU12()
480 cinfo.comp_info[1].h_samp_factor = 1; in encodeJpegYU12()
481 cinfo.comp_info[1].v_samp_factor = 1; in encodeJpegYU12()
482 cinfo.comp_info[2].h_samp_factor = 1; in encodeJpegYU12()
483 cinfo.comp_info[2].v_samp_factor = 1; in encodeJpegYU12()
487 cinfo.comp_info[0].v_samp_factor, in encodeJpegYU12()
488 cinfo.comp_info[1].v_samp_factor, in encodeJpegYU12()
489 cinfo.comp_info[2].v_samp_factor in encodeJpegYU12()
491 int cVSubSampling = cinfo.comp_info[0].v_samp_factor / in encodeJpegYU12()
492 cinfo.comp_info[1].v_samp_factor; in encodeJpegYU12()
495 jpeg_start_compress(&cinfo, TRUE); in encodeJpegYU12()
531 jpeg_write_marker(&cinfo, JPEG_APP0 + 1, in encodeJpegYU12()
537 while (cinfo.next_scanline < cinfo.image_height) { in encodeJpegYU12()
539 const uint32_t nl = cinfo.next_scanline; in encodeJpegYU12()
544 uint32_t done = jpeg_write_raw_data(&cinfo, planes, batchSize); in encodeJpegYU12()
548 __FUNCTION__, done, batchSize, cinfo.next_scanline, in encodeJpegYU12()
549 cinfo.image_height); in encodeJpegYU12()
555 jpeg_finish_compress(&cinfo); in encodeJpegYU12()