Lines Matching refs:line_buffer

1092 static void stbiw__encode_png_line(unsigned char *pixels, int stride_bytes, int width, int height, int y, int n, int filter_type, signed char *line_buffer)
1103 memcpy(line_buffer, z, width*n);
1110 case 1: line_buffer[i] = z[i]; break;
1111 case 2: line_buffer[i] = z[i] - z[i-signed_stride]; break;
1112 case 3: line_buffer[i] = z[i] - (z[i-signed_stride]>>1); break;
1113 case 4: line_buffer[i] = (signed char) (z[i] - stbiw__paeth(0,z[i-signed_stride],0)); break;
1114 case 5: line_buffer[i] = z[i]; break;
1115 case 6: line_buffer[i] = z[i]; break;
1119 case 1: for (i=n; i < width*n; ++i) line_buffer[i] = z[i] - z[i-n]; break;
1120 case 2: for (i=n; i < width*n; ++i) line_buffer[i] = z[i] - z[i-signed_stride]; break;
1121 case 3: for (i=n; i < width*n; ++i) line_buffer[i] = z[i] - ((z[i-n] + z[i-signed_stride])>>1); break;
1122 case 4: for (i=n; i < width*n; ++i) line_buffer[i] = z[i] - stbiw__paeth(z[i-n], z[i-signed_stride], z[i-signed_stride-n]); break;
1123 case 5: for (i=n; i < width*n; ++i) line_buffer[i] = z[i] - (z[i-n]>>1); break;
1124 case 6: for (i=n; i < width*n; ++i) line_buffer[i] = z[i] - stbiw__paeth(z[i-n], 0,0); break;
1134 signed char *line_buffer;
1145 line_buffer = (signed char *) STBIW_MALLOC(x * n); if (!line_buffer) { STBIW_FREE(filt); return 0; }
1150 stbiw__encode_png_line((unsigned char*)(pixels), stride_bytes, x, y, j, n, force_filter, line_buffer);
1154 stbiw__encode_png_line((unsigned char*)(pixels), stride_bytes, x, y, j, n, filter_type, line_buffer);
1159 est += abs((signed char) line_buffer[i]);
1167 stbiw__encode_png_line((unsigned char*)(pixels), stride_bytes, x, y, j, n, best_filter, line_buffer);
1171 // when we get here, filter_type contains the filter type, and line_buffer contains the data
1173 STBIW_MEMMOVE(filt+j*(x*n+1)+1, line_buffer, x*n);
1175 STBIW_FREE(line_buffer);