Home
last modified time | relevance | path

Searched refs:bit_depth (Results 1 – 25 of 115) sorted by relevance

12345

/external/libpng/
Dpngwtran.c25 png_do_pack(png_row_infop row_info, png_bytep row, png_uint_32 bit_depth) in png_do_pack() argument
29 if (row_info->bit_depth == 8 && in png_do_pack()
32 switch ((int)bit_depth) in png_do_pack()
153 row_info->bit_depth = (png_byte)bit_depth; in png_do_pack()
154 row_info->pixel_depth = (png_byte)(bit_depth * row_info->channels); in png_do_pack()
171 png_const_color_8p bit_depth) in png_do_shift() argument
182 shift_start[channels] = row_info->bit_depth - bit_depth->red; in png_do_shift()
183 shift_dec[channels] = bit_depth->red; in png_do_shift()
186 shift_start[channels] = row_info->bit_depth - bit_depth->green; in png_do_shift()
187 shift_dec[channels] = bit_depth->green; in png_do_shift()
[all …]
Dpngtrans.c42 if (png_ptr->bit_depth == 16) in png_set_swap()
57 if (png_ptr->bit_depth < 8) in png_set_packing()
77 if (png_ptr->bit_depth < 8) in png_set_packswap()
162 if (png_ptr->bit_depth >= 8) in png_set_filler()
282 row_info->bit_depth == 8) in png_do_invert()
297 row_info->bit_depth == 16) in png_do_invert()
322 if (row_info->bit_depth == 16) in png_do_swap()
451 if (row_info->bit_depth < 8) in png_do_packswap()
458 if (row_info->bit_depth == 1) in png_do_packswap()
461 else if (row_info->bit_depth == 2) in png_do_packswap()
[all …]
Dpngrtran.c1233 switch (png_ptr->bit_depth) in png_init_rgb_transformations()
1487 png_ptr->bit_depth != 16) in png_init_read_transformations()
1514 png_ptr->bit_depth == 16) in png_init_read_transformations()
1572 png_build_gamma_table(png_ptr, png_ptr->bit_depth); in png_init_read_transformations()
1943 info_ptr->bit_depth = 8; in png_read_transform_info()
1956 if (info_ptr->bit_depth < 8) in png_read_transform_info()
1957 info_ptr->bit_depth = 8; in png_read_transform_info()
1986 if (info_ptr->bit_depth == 16) in png_read_transform_info()
1991 info_ptr->bit_depth = 8; in png_read_transform_info()
1996 info_ptr->bit_depth = 8; in png_read_transform_info()
[all …]
/external/libpng/contrib/examples/
Dpngpixel.c33 unsigned int bit_depth, unsigned int channels) in component() argument
40 png_uint_32 bit_offset_hi = bit_depth * ((x >> 6) * channels); in component()
41 png_uint_32 bit_offset_lo = bit_depth * ((x & 0x3f) * channels + c); in component()
51 switch (bit_depth) in component()
62 fprintf(stderr, "pngpixel: invalid bit depth %u\n", bit_depth); in component()
74 PNG_CONST unsigned int bit_depth = png_get_bit_depth(png_ptr, info_ptr); in print_pixel() local
79 printf("GRAY %u\n", component(row, x, 0, bit_depth, 1)); in print_pixel()
88 PNG_CONST unsigned int index = component(row, x, 0, bit_depth, 1); in print_pixel()
117 printf("RGB %u %u %u\n", component(row, x, 0, bit_depth, 3), in print_pixel()
118 component(row, x, 1, bit_depth, 3), in print_pixel()
[all …]
/external/chromium_org/third_party/libpng/
Dpngwtran.c57 (png_uint_32)png_ptr->bit_depth); in png_do_write_transformations()
92 png_do_pack(png_row_infop row_info, png_bytep row, png_uint_32 bit_depth) in png_do_pack() argument
96 if (row_info->bit_depth == 8 && in png_do_pack()
102 switch ((int)bit_depth) in png_do_pack()
202 row_info->bit_depth = (png_byte)bit_depth; in png_do_pack()
203 row_info->pixel_depth = (png_byte)(bit_depth * row_info->channels); in png_do_pack()
219 png_do_shift(png_row_infop row_info, png_bytep row, png_color_8p bit_depth) in png_do_shift() argument
235 shift_start[channels] = row_info->bit_depth - bit_depth->red; in png_do_shift()
236 shift_dec[channels] = bit_depth->red; in png_do_shift()
238 shift_start[channels] = row_info->bit_depth - bit_depth->green; in png_do_shift()
[all …]
Dpngtrans.c41 if (png_ptr->bit_depth == 16) in png_set_swap()
55 if (png_ptr->bit_depth < 8) in png_set_packing()
72 if (png_ptr->bit_depth < 8) in png_set_packswap()
144 if (png_ptr->color_type == PNG_COLOR_TYPE_GRAY && png_ptr->bit_depth >= 8) in png_set_filler()
229 row_info->bit_depth == 8) in png_do_invert()
242 row_info->bit_depth == 16) in png_do_invert()
269 row_info->bit_depth == 16) in png_do_swap()
401 row_info->bit_depth < 8) in png_do_packswap()
407 if (row_info->bit_depth == 1) in png_do_packswap()
409 else if (row_info->bit_depth == 2) in png_do_packswap()
[all …]
Dpngrtran.c829 switch (png_ptr->bit_depth) in png_init_read_transformations()
1046 double m = (double)(((png_uint_32)1 << png_ptr->bit_depth) - 1); in png_init_read_transformations()
1214 info_ptr->bit_depth = 8; in png_read_transform_info()
1224 if (info_ptr->bit_depth < 8) in png_read_transform_info()
1225 info_ptr->bit_depth = 8; in png_read_transform_info()
1253 if ((png_ptr->transformations & PNG_16_TO_8) && (info_ptr->bit_depth == 16)) in png_read_transform_info()
1254 info_ptr->bit_depth = 8; in png_read_transform_info()
1272 png_ptr->palette_lookup && info_ptr->bit_depth == 8) in png_read_transform_info()
1280 if ((png_ptr->transformations & PNG_PACK) && (info_ptr->bit_depth < 8)) in png_read_transform_info()
1281 info_ptr->bit_depth = 8; in png_read_transform_info()
[all …]
/external/qemu/distrib/libpng-1.2.46/
Dpngwtran.c57 (png_uint_32)png_ptr->bit_depth); in png_do_write_transformations()
92 png_do_pack(png_row_infop row_info, png_bytep row, png_uint_32 bit_depth) in png_do_pack() argument
96 if (row_info->bit_depth == 8 && in png_do_pack()
102 switch ((int)bit_depth) in png_do_pack()
202 row_info->bit_depth = (png_byte)bit_depth; in png_do_pack()
203 row_info->pixel_depth = (png_byte)(bit_depth * row_info->channels); in png_do_pack()
219 png_do_shift(png_row_infop row_info, png_bytep row, png_color_8p bit_depth) in png_do_shift() argument
235 shift_start[channels] = row_info->bit_depth - bit_depth->red; in png_do_shift()
236 shift_dec[channels] = bit_depth->red; in png_do_shift()
238 shift_start[channels] = row_info->bit_depth - bit_depth->green; in png_do_shift()
[all …]
Dpngtrans.c41 if (png_ptr->bit_depth == 16) in png_set_swap()
55 if (png_ptr->bit_depth < 8) in png_set_packing()
72 if (png_ptr->bit_depth < 8) in png_set_packswap()
144 if (png_ptr->color_type == PNG_COLOR_TYPE_GRAY && png_ptr->bit_depth >= 8) in png_set_filler()
229 row_info->bit_depth == 8) in png_do_invert()
242 row_info->bit_depth == 16) in png_do_invert()
269 row_info->bit_depth == 16) in png_do_swap()
401 row_info->bit_depth < 8) in png_do_packswap()
407 if (row_info->bit_depth == 1) in png_do_packswap()
409 else if (row_info->bit_depth == 2) in png_do_packswap()
[all …]
Dpngrtran.c829 switch (png_ptr->bit_depth) in png_init_read_transformations()
1046 double m = (double)(((png_uint_32)1 << png_ptr->bit_depth) - 1); in png_init_read_transformations()
1214 info_ptr->bit_depth = 8; in png_read_transform_info()
1224 if (info_ptr->bit_depth < 8) in png_read_transform_info()
1225 info_ptr->bit_depth = 8; in png_read_transform_info()
1253 if ((png_ptr->transformations & PNG_16_TO_8) && (info_ptr->bit_depth == 16)) in png_read_transform_info()
1254 info_ptr->bit_depth = 8; in png_read_transform_info()
1272 png_ptr->palette_lookup && info_ptr->bit_depth == 8) in png_read_transform_info()
1280 if ((png_ptr->transformations & PNG_PACK) && (info_ptr->bit_depth < 8)) in png_read_transform_info()
1281 info_ptr->bit_depth = 8; in png_read_transform_info()
[all …]
/external/libpng/contrib/libtests/
Dmakepng.c132 pixel_depth_of_type(int color_type, int bit_depth) in pixel_depth_of_type() argument
134 return channels_of_type(color_type) * bit_depth; in pixel_depth_of_type()
138 image_size_of_type(int color_type, int bit_depth, unsigned int *colors) in image_size_of_type() argument
145 int pixel_depth = pixel_depth_of_type(color_type, bit_depth); in image_size_of_type()
170 generate_palette(png_colorp palette, png_bytep trans, int bit_depth, in generate_palette() argument
210 if (bit_depth == 1) in generate_palette()
219 unsigned int size = 1U << (bit_depth/2); /* 2, 4 or 16 */ in generate_palette()
249 set_value(png_bytep row, size_t rowbytes, png_uint_32 x, unsigned int bit_depth, in set_value() argument
252 unsigned int mask = (1U << bit_depth)-1; in set_value()
254 x *= bit_depth; /* Maximum x is 4*1024, maximum bit_depth is 16 */ in set_value()
[all …]
Dpngvalid.c297 int bit_depth, unsigned int npalette, int interlace_type, in standard_name() argument
308 pos = safecatn(buffer, bufsize, pos, bit_depth); in standard_name()
359 #define PALETTE_COUNT(bit_depth) ((bit_depth) > 4 ? 1U : 16U) argument
362 next_format(png_bytep colour_type, png_bytep bit_depth, in next_format() argument
365 if (*bit_depth == 0) in next_format()
369 *bit_depth = 8; in next_format()
371 *bit_depth = 1; in next_format()
379 if (++*palette_number < PALETTE_COUNT(*bit_depth)) in next_format()
385 *bit_depth = (png_byte)(*bit_depth << 1); in next_format()
388 if (*bit_depth <= 8 in next_format()
[all …]
/external/libhevc/common/
Dihevc_iquant_recon.c125 WORD32 log2_trans_size, bit_depth; in ihevc_iquant_recon_4x4_ttype1() local
128 bit_depth = 8 + 0; in ihevc_iquant_recon_4x4_ttype1()
129 shift_iq = bit_depth + log2_trans_size - 5; in ihevc_iquant_recon_4x4_ttype1()
237 WORD32 log2_trans_size, bit_depth; in ihevc_iquant_recon_4x4() local
240 bit_depth = 8 + 0; in ihevc_iquant_recon_4x4()
241 shift_iq = bit_depth + log2_trans_size - 5; in ihevc_iquant_recon_4x4()
348 WORD32 log2_trans_size, bit_depth; in ihevc_iquant_recon_8x8() local
351 bit_depth = 8 + 0; in ihevc_iquant_recon_8x8()
352 shift_iq = bit_depth + log2_trans_size - 5; in ihevc_iquant_recon_8x8()
460 WORD32 log2_trans_size, bit_depth; in ihevc_iquant_recon_16x16() local
[all …]
Dihevc_trans_macros.h41 …WORD32 bit_depth,transform_shift; …
46bit_depth = 8; …
47 …transform_shift = MAX_TR_DYNAMIC_RANGE - bit_depth - log2_trans_size; …
62 #define QUANT_HBD(out, inp, quant_coeff, qp_div, log2_trans_size, q_add, bit_depth) \ argument
72 …transform_shift = MAX_TR_DYNAMIC_RANGE - bit_depth - log2_trans_size; …
91 …WORD32 bit_depth,transform_shift; …
96bit_depth = 8; …
97 …transform_shift = MAX_TR_DYNAMIC_RANGE - bit_depth - log2_trans_size; …
112 #define QUANT_NO_WEIGHTMAT_HBD(out, inp, quant_coeff, qp_div, log2_trans_size, q_add, bit_depth) \ argument
122 …transform_shift = MAX_TR_DYNAMIC_RANGE - bit_depth - log2_trans_size; …
Dihevc_chroma_iquant_recon.c131 WORD32 log2_trans_size, bit_depth; in ihevc_chroma_iquant_recon_4x4() local
134 bit_depth = 8 + 0; in ihevc_chroma_iquant_recon_4x4()
135 shift_iq = bit_depth + log2_trans_size - 5; in ihevc_chroma_iquant_recon_4x4()
243 WORD32 log2_trans_size, bit_depth; in ihevc_chroma_iquant_recon_8x8() local
246 bit_depth = 8 + 0; in ihevc_chroma_iquant_recon_8x8()
247 shift_iq = bit_depth + log2_trans_size - 5; in ihevc_chroma_iquant_recon_8x8()
356 WORD32 log2_trans_size, bit_depth; in ihevc_chroma_iquant_recon_16x16() local
359 bit_depth = 8 + 0; in ihevc_chroma_iquant_recon_16x16()
360 shift_iq = bit_depth + log2_trans_size - 5; in ihevc_chroma_iquant_recon_16x16()
Dihevc_intra_pred.h169 UWORD8 bit_depth);
179 UWORD8 bit_depth);
189 UWORD8 bit_depth);
199 UWORD8 bit_depth);
209 UWORD8 bit_depth);
219 UWORD8 bit_depth);
229 UWORD8 bit_depth);
239 UWORD8 bit_depth);
248 UWORD8 bit_depth);
259 UWORD8 bit_depth);
[all …]
Dihevc_sao.c202 WORD32 bit_depth; in ihevc_sao_edge_offset_class0() local
205 bit_depth = BIT_DEPTH_LUMA; in ihevc_sao_edge_offset_class0()
248 … pu1_src[col] = CLIP3(pu1_src[col] + pi1_sao_offset[edge_idx], 0, (1 << bit_depth) - 1); in ihevc_sao_edge_offset_class0()
286 WORD32 bit_depth; in ihevc_sao_edge_offset_class0_chroma() local
289 bit_depth = BIT_DEPTH_CHROMA; in ihevc_sao_edge_offset_class0_chroma()
347 … pu1_src[col] = CLIP3(pu1_src[col] + pi1_sao_offset[edge_idx], 0, (1 << bit_depth) - 1); in ihevc_sao_edge_offset_class0_chroma()
382 WORD32 bit_depth; in ihevc_sao_edge_offset_class1() local
386 bit_depth = BIT_DEPTH_LUMA; in ihevc_sao_edge_offset_class1()
440 … pu1_src[col] = CLIP3(pu1_src[col] + pi1_sao_offset[edge_idx], 0, (1 << bit_depth) - 1); in ihevc_sao_edge_offset_class1()
476 WORD32 bit_depth; in ihevc_sao_edge_offset_class1_chroma() local
[all …]
Dihevc_recon.h51 UWORD8 bit_depth);
66 UWORD8 bit_depth);
81 UWORD8 bit_depth);
96 UWORD8 bit_depth);
111 UWORD8 bit_depth);
Dihevc_inter_pred.h97 UWORD8 bit_depth);
108 UWORD8 bit_depth);
119 UWORD8 bit_depth);
130 UWORD8 bit_depth);
143 UWORD8 bit_depth);
162 UWORD8 bit_depth);
176 UWORD8 bit_depth);
189 UWORD8 bit_depth);
210 UWORD8 bit_depth);
222 UWORD8 bit_depth);
Dihevc_deblk_edge_filter.c348 UWORD8 bit_depth) in ihevc_hbd_deblk_luma_vert() argument
372 beta = gai4_ihevc_beta_table[beta_indx] * (1 << (bit_depth - 8)); in ihevc_hbd_deblk_luma_vert()
373 tc = gai4_ihevc_tc_table[tc_indx] * (1 << (bit_depth - 8)); in ihevc_hbd_deblk_luma_vert()
486 tmp_p0 = CLIP3(pu2_src[-1] + delta, 0, ((1 << bit_depth) - 1)); in ihevc_hbd_deblk_luma_vert()
487 tmp_q0 = CLIP3(pu2_src[0] - delta, 0, ((1 << bit_depth) - 1)); in ihevc_hbd_deblk_luma_vert()
494 tmp_p1 = CLIP3(pu2_src[-2] + delta_p, 0, ((1 << bit_depth) - 1)); in ihevc_hbd_deblk_luma_vert()
503 tmp_q1 = CLIP3(pu2_src[1] + delta_q, 0, ((1 << bit_depth) - 1)); in ihevc_hbd_deblk_luma_vert()
847 UWORD8 bit_depth) in ihevc_hbd_deblk_luma_horz() argument
871 beta = gai4_ihevc_beta_table[beta_indx] * (1 << (bit_depth - 8)); in ihevc_hbd_deblk_luma_horz()
872 tc = gai4_ihevc_tc_table[tc_indx] * (1 << (bit_depth - 8)); in ihevc_hbd_deblk_luma_horz()
[all …]
Dihevc_iquant_recon.h57 UWORD8 bit_depth);
78 UWORD8 bit_depth);
99 UWORD8 bit_depth);
120 UWORD8 bit_depth);
141 UWORD8 bit_depth);
/external/libpng/contrib/pngminus/
Dpnm2png.c207 int bit_depth = 0; in pnm2png() local
237 bit_depth = 1; in pnm2png()
259 bit_depth = 1; in pnm2png()
261 bit_depth = 2; in pnm2png()
263 bit_depth = 4; in pnm2png()
265 bit_depth = 8; in pnm2png()
267 bit_depth = 16; in pnm2png()
283 bit_depth = 1; in pnm2png()
285 bit_depth = 2; in pnm2png()
287 bit_depth = 4; in pnm2png()
[all …]
Dpng2pnm.c201 int bit_depth; in png2pnm() local
248 &width, &height, &bit_depth, &color_type, in png2pnm()
257 if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) in png2pnm()
265 if (bit_depth == 16) in png2pnm()
282 png_get_IHDR (png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, in png2pnm()
286 if (bit_depth == 16) in png2pnm()
351 fprintf (pnm_file, "%ld\n", ((1L << (int) bit_depth) - 1L)); in png2pnm()
358 fprintf (pnm_file, "%ld\n", ((1L << (int) bit_depth) - 1L)); in png2pnm()
369 fprintf (alpha_file, "%ld\n", ((1L << (int) bit_depth) - 1L)); in png2pnm()
384 if (bit_depth == 16){ in png2pnm()
[all …]
/external/libpng/contrib/gregbook/
Dreadpng.c73 int bit_depth, color_type; variable
138 png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, in readpng_init()
182 if (bit_depth == 16) { in readpng_get_bgcolor()
186 } else if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) { in readpng_get_bgcolor()
187 if (bit_depth == 1) in readpng_get_bgcolor()
189 else if (bit_depth == 2) in readpng_get_bgcolor()
233 if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) in readpng_get_image()
238 if (bit_depth == 16) in readpng_get_image()
Dreadpng2.c214 int color_type, bit_depth; in readpng2_info_callback() local
255 png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, in readpng2_info_callback()
276 if (bit_depth == 16) { in readpng2_info_callback()
280 } else if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) { in readpng2_info_callback()
281 if (bit_depth == 1) in readpng2_info_callback()
284 else if (bit_depth == 2) in readpng2_info_callback()
305 if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) in readpng2_info_callback()
310 if (bit_depth == 16) in readpng2_info_callback()

12345