• Home
  • Raw
  • Download

Lines Matching refs:dinfo

109 static SkEncodedOrigin get_exif_orientation(jpeg_decompress_struct* dinfo) {  in get_exif_orientation()  argument
111 for (jpeg_marker_struct* marker = dinfo->marker_list; marker; marker = marker->next) { in get_exif_orientation()
134 static std::unique_ptr<SkEncodedInfo::ICCProfile> read_color_profile(jpeg_decompress_struct* dinfo) in read_color_profile() argument
143 for (jpeg_marker_struct* marker = dinfo->marker_list; marker; marker = marker->next) { in read_color_profile()
213 auto* dinfo = decoderMgr->dinfo(); in ReadHeader() local
219 jpeg_save_markers(dinfo, kExifMarker, 0xFFFF); in ReadHeader()
220 jpeg_save_markers(dinfo, kICCMarker, 0xFFFF); in ReadHeader()
224 switch (jpeg_read_header(dinfo, true)) { in ReadHeader()
240 SkEncodedOrigin orientation = get_exif_orientation(dinfo); in ReadHeader()
241 auto profile = read_color_profile(dinfo); in ReadHeader()
244 switch (decoderMgr->dinfo()->jpeg_color_space) { in ReadHeader()
269 SkEncodedInfo info = SkEncodedInfo::Make(dinfo->image_width, dinfo->image_height, in ReadHeader()
305 , fReadyState(decoderMgr->dinfo()->global_state) in SkJpegCodec()
314 static size_t get_row_bytes(const j_decompress_ptr dinfo) { in get_row_bytes() argument
315 const size_t colorBytes = (dinfo->out_color_space == JCS_RGB565) ? 2 : in get_row_bytes()
316 dinfo->out_color_components; in get_row_bytes()
317 return dinfo->output_width * colorBytes; in get_row_bytes()
327 void calc_output_dimensions(jpeg_decompress_struct* dinfo, unsigned int num, unsigned int denom) { in calc_output_dimensions() argument
328 dinfo->num_components = 0; in calc_output_dimensions()
329 dinfo->scale_num = num; in calc_output_dimensions()
330 dinfo->scale_denom = denom; in calc_output_dimensions()
331 jpeg_calc_output_dimensions(dinfo); in calc_output_dimensions()
361 jpeg_decompress_struct dinfo; in onGetScaledDimensions() local
362 sk_bzero(&dinfo, sizeof(dinfo)); in onGetScaledDimensions()
363 dinfo.image_width = this->dimensions().width(); in onGetScaledDimensions()
364 dinfo.image_height = this->dimensions().height(); in onGetScaledDimensions()
365 dinfo.global_state = fReadyState; in onGetScaledDimensions()
366 calc_output_dimensions(&dinfo, num, denom); in onGetScaledDimensions()
369 return SkISize::Make(dinfo.output_width, dinfo.output_height); in onGetScaledDimensions()
401 J_COLOR_SPACE encodedColorType = fDecoderMgr->dinfo()->jpeg_color_space; in conversionSupported()
406 fDecoderMgr->dinfo()->out_color_space = JCS_EXT_RGBA; in conversionSupported()
412 fDecoderMgr->dinfo()->out_color_space = JCS_EXT_RGBA; in conversionSupported()
414 fDecoderMgr->dinfo()->out_color_space = JCS_EXT_BGRA; in conversionSupported()
419 fDecoderMgr->dinfo()->out_color_space = JCS_EXT_RGBA; in conversionSupported()
421 fDecoderMgr->dinfo()->dither_mode = JDITHER_NONE; in conversionSupported()
422 fDecoderMgr->dinfo()->out_color_space = JCS_RGB565; in conversionSupported()
431 fDecoderMgr->dinfo()->out_color_space = JCS_EXT_RGBA; in conversionSupported()
433 fDecoderMgr->dinfo()->out_color_space = JCS_GRAYSCALE; in conversionSupported()
438 fDecoderMgr->dinfo()->out_color_space = JCS_EXT_RGBA; in conversionSupported()
447 fDecoderMgr->dinfo()->out_color_space = JCS_CMYK; in conversionSupported()
468 jpeg_decompress_struct dinfo; in onDimensionsSupported() local
469 sk_bzero(&dinfo, sizeof(dinfo)); in onDimensionsSupported()
470 dinfo.image_width = this->dimensions().width(); in onDimensionsSupported()
471 dinfo.image_height = this->dimensions().height(); in onDimensionsSupported()
472 dinfo.global_state = fReadyState; in onDimensionsSupported()
477 calc_output_dimensions(&dinfo, num, denom); in onDimensionsSupported()
478 while (dinfo.output_width != dstWidth || dinfo.output_height != dstHeight) { in onDimensionsSupported()
481 if (1 == num || dstWidth > dinfo.output_width || dstHeight > dinfo.output_height) { in onDimensionsSupported()
487 calc_output_dimensions(&dinfo, num, denom); in onDimensionsSupported()
490 fDecoderMgr->dinfo()->scale_num = num; in onDimensionsSupported()
491 fDecoderMgr->dinfo()->scale_denom = denom; in onDimensionsSupported()
534 uint32_t lines = jpeg_read_scanlines(fDecoderMgr->dinfo(), &decodeDst, 1); in readRows()
585 jpeg_decompress_struct* dinfo = fDecoderMgr->dinfo(); in onGetPixels() local
593 if (!jpeg_start_decompress(dinfo)) { in onGetPixels()
599 SkASSERT(1 == dinfo->rec_outbuf_height); in onGetPixels()
601 if (needs_swizzler_to_convert_from_cmyk(dinfo->out_color_space, in onGetPixels()
622 swizzleBytes = get_row_bytes(fDecoderMgr->dinfo()); in allocateStorage()
668 switch (fDecoderMgr->dinfo()->out_color_space) { in initializeSwizzler()
696 fDecoderMgr->dinfo()->out_color_space, this->getEncodedInfo().profile(), in getSampler()
712 if (!jpeg_start_decompress(fDecoderMgr->dinfo())) { in onStartScanlineDecode()
718 fDecoderMgr->dinfo()->out_color_space, this->getEncodedInfo().profile(), in onStartScanlineDecode()
729 jpeg_crop_scanline(fDecoderMgr->dinfo(), &startX, &width); in onStartScanlineDecode()
771 fDecoderMgr->dinfo()->output_scanline = this->dstInfo().height(); in onGetScanlines()
784 return (uint32_t) count == jpeg_skip_scanlines(fDecoderMgr->dinfo(), count); in onSkipScanlines()
787 static bool is_yuv_supported(jpeg_decompress_struct* dinfo) { in is_yuv_supported() argument
789 SkASSERT(dinfo->scale_num == dinfo->scale_denom); in is_yuv_supported()
794 if (JCS_YCbCr != dinfo->jpeg_color_space) { in is_yuv_supported()
798 SkASSERT(3 == dinfo->num_components); in is_yuv_supported()
799 SkASSERT(dinfo->comp_info); in is_yuv_supported()
816 if ((1 != dinfo->comp_info[1].h_samp_factor) || in is_yuv_supported()
817 (1 != dinfo->comp_info[1].v_samp_factor) || in is_yuv_supported()
818 (1 != dinfo->comp_info[2].h_samp_factor) || in is_yuv_supported()
819 (1 != dinfo->comp_info[2].v_samp_factor)) in is_yuv_supported()
832 int hSampY = dinfo->comp_info[0].h_samp_factor; in is_yuv_supported()
833 int vSampY = dinfo->comp_info[0].v_samp_factor; in is_yuv_supported()
843 jpeg_decompress_struct* dinfo = fDecoderMgr->dinfo(); in onQueryYUV8() local
844 if (!is_yuv_supported(dinfo)) { in onQueryYUV8()
848 jpeg_component_info * comp_info = dinfo->comp_info; in onQueryYUV8()
889 jpeg_decompress_struct* dinfo = fDecoderMgr->dinfo(); in onGetYUV8Planes() local
891 dinfo->raw_data_out = TRUE; in onGetYUV8Planes()
892 if (!jpeg_start_decompress(dinfo)) { in onGetYUV8Planes()
899 SkASSERT(is_yuv_supported(dinfo)); in onGetYUV8Planes()
904 SkASSERT((uint32_t) sizeInfo.fSizes[0].width() == dinfo->output_width && in onGetYUV8Planes()
905 (uint32_t) sizeInfo.fSizes[0].height() == dinfo->output_height); in onGetYUV8Planes()
920 int numYRowsPerBlock = DCTSIZE * dinfo->comp_info[0].v_samp_factor; in onGetYUV8Planes()
941 const int numIters = dinfo->output_height / numRowsPerBlock; in onGetYUV8Planes()
943 JDIMENSION linesRead = jpeg_read_raw_data(dinfo, yuv, numRowsPerBlock); in onGetYUV8Planes()
959 uint32_t remainingRows = dinfo->output_height - dinfo->output_scanline; in onGetYUV8Planes()
960 SkASSERT(remainingRows == dinfo->output_height % numRowsPerBlock); in onGetYUV8Planes()
961 SkASSERT(dinfo->output_scanline == numIters * numRowsPerBlock); in onGetYUV8Planes()
971 int remainingUVRows = dinfo->comp_info[1].downsampled_height - DCTSIZE * numIters; in onGetYUV8Planes()
977 JDIMENSION linesRead = jpeg_read_raw_data(dinfo, yuv, numRowsPerBlock); in onGetYUV8Planes()
1004 jpeg_decompress_struct* dinfo = decoderMgr.dinfo(); in SkGetJpegInfo() local
1005 jpeg_save_markers(dinfo, kExifMarker, 0xFFFF); in SkGetJpegInfo()
1006 jpeg_save_markers(dinfo, kICCMarker, 0xFFFF); in SkGetJpegInfo()
1007 if (JPEG_HEADER_OK != jpeg_read_header(dinfo, true)) { in SkGetJpegInfo()
1018 *orientation = get_exif_orientation(dinfo); in SkGetJpegInfo()
1021 *size = {SkToS32(dinfo->image_width), SkToS32(dinfo->image_height)}; in SkGetJpegInfo()