Lines Matching refs:cinfo

75 static void libjpeg_init_source(j_decompress_ptr cinfo) {
76 libjpeg_source_mgr* src = (libjpeg_source_mgr*)cinfo->src;
82 static boolean libjpeg_seek_input_data(j_decompress_ptr cinfo, long byte_offset) {
83 libjpeg_source_mgr* src = (libjpeg_source_mgr*)cinfo->src;
90 static boolean libjpeg_fill_input_buffer(j_decompress_ptr cinfo) {
91 libjpeg_source_mgr* src = (libjpeg_source_mgr*)cinfo->src;
98 static void libjpeg_skip_input_data(j_decompress_ptr cinfo, long num_bytes) {
99 libjpeg_source_mgr* src = (libjpeg_source_mgr*)cinfo->src;
109 static boolean libjpeg_resync_to_restart(j_decompress_ptr cinfo, int desired) {
110 libjpeg_source_mgr* src = (libjpeg_source_mgr*)cinfo->src;
116 static void libjpeg_term_source(j_decompress_ptr /*cinfo*/) {}
187 struct jpeg_decompress_struct cinfo;
194 cinfo.err = jpeg_std_error(&jerr);
195 jpeg_create_decompress(&cinfo);
197 cinfo.src = &s_mgr;
198 int status = jpeg_read_header(&cinfo, true);
204 cinfo.out_color_space = JCS_YCbCr;
205 cinfo.raw_data_out = true;
206 status = jpeg_start_decompress(&cinfo);
213 mWidth = cinfo.output_width;
214 mHeight = cinfo.output_height;
215 CAMHAL_LOGEA("w x h = %d x %d. stride=%d", cinfo.output_width, cinfo.output_height, stride);
217 else if ((cinfo.output_width > mWidth) || (cinfo.output_height > mHeight)) {
219 mWidth, mHeight, cinfo.output_width, cinfo.output_height);
223 unsigned int decoded_uv_buffer_size = cinfo.output_width * cinfo.output_height / 2;
224 if (Y_Plane == NULL)Y_Plane = (unsigned char **)malloc(cinfo.output_height * sizeof(unsigned char *));
225 if (U_Plane == NULL)U_Plane = (unsigned char **)malloc(cinfo.output_height * sizeof(unsigned char *));
226 if (V_Plane == NULL)V_Plane = (unsigned char **)malloc(cinfo.output_height * sizeof(unsigned char *));
237 for (unsigned int j = 0; j < cinfo.output_height; j++, row += stride)
243 for (unsigned int j = 0; j < cinfo.output_height; j+=2, row += cinfo.output_width / 2){
249 for (unsigned int j = 0; j < cinfo.output_height; j+=2, row += cinfo.output_width / 2){
255 for (unsigned int i = 0; i < cinfo.output_height; i += 8) {
256 jpeg_read_raw_data(&cinfo, YUV_Planes, 8);
262 unsigned char *uv_ptr = nv12_buffer + (stride * cinfo.output_height);
265 for(unsigned int i = 0; i < cinfo.output_height / 2; i++){
266 for(unsigned int j = 0; j < cinfo.output_width; j+=2){
273 jpeg_finish_decompress(&cinfo);
274 jpeg_destroy_decompress(&cinfo);