/external/libpng/ |
D | pngwtran.c | 25 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() 155 row_info->bit_depth = (png_byte)bit_depth; in png_do_pack() 156 row_info->pixel_depth = (png_byte)(bit_depth * row_info->channels); in png_do_pack() 173 png_const_color_8p bit_depth) in png_do_shift() argument 184 shift_start[channels] = row_info->bit_depth - bit_depth->red; in png_do_shift() 185 shift_dec[channels] = bit_depth->red; in png_do_shift() 188 shift_start[channels] = row_info->bit_depth - bit_depth->green; in png_do_shift() 189 shift_dec[channels] = bit_depth->green; in png_do_shift() [all …]
|
D | pngtrans.c | 42 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() 283 row_info->bit_depth == 8) in png_do_invert() 298 row_info->bit_depth == 16) in png_do_invert() 323 if (row_info->bit_depth == 16) in png_do_swap() 459 if (row_info->bit_depth < 8) in png_do_packswap() 466 if (row_info->bit_depth == 1) in png_do_packswap() 469 else if (row_info->bit_depth == 2) in png_do_packswap() [all …]
|
/external/pdfium/third_party/libpng16/ |
D | pngwtran.c | 25 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() 155 row_info->bit_depth = (png_byte)bit_depth; in png_do_pack() 156 row_info->pixel_depth = (png_byte)(bit_depth * row_info->channels); in png_do_pack() 173 png_const_color_8p bit_depth) in png_do_shift() argument 184 shift_start[channels] = row_info->bit_depth - bit_depth->red; in png_do_shift() 185 shift_dec[channels] = bit_depth->red; in png_do_shift() 188 shift_start[channels] = row_info->bit_depth - bit_depth->green; in png_do_shift() 189 shift_dec[channels] = bit_depth->green; in png_do_shift() [all …]
|
D | pngtrans.c | 42 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() 458 if (row_info->bit_depth < 8) in png_do_packswap() 465 if (row_info->bit_depth == 1) in png_do_packswap() 468 else if (row_info->bit_depth == 2) in png_do_packswap() [all …]
|
/external/libpng/contrib/examples/ |
D | pngpixel.c | 35 unsigned int bit_depth, unsigned int channels) in component() argument 42 png_uint_32 bit_offset_hi = bit_depth * ((x >> 6) * channels); in component() 43 png_uint_32 bit_offset_lo = bit_depth * ((x & 0x3f) * channels + c); in component() 53 switch (bit_depth) in component() 64 fprintf(stderr, "pngpixel: invalid bit depth %u\n", bit_depth); in component() 76 PNG_CONST unsigned int bit_depth = png_get_bit_depth(png_ptr, info_ptr); in print_pixel() local 81 printf("GRAY %u\n", component(row, x, 0, bit_depth, 1)); in print_pixel() 90 PNG_CONST int index = component(row, x, 0, bit_depth, 1); in print_pixel() 119 printf("RGB %u %u %u\n", component(row, x, 0, bit_depth, 3), in print_pixel() 120 component(row, x, 1, bit_depth, 3), in print_pixel() [all …]
|
/external/libaom/libaom/av1/encoder/ |
D | palette.c | 44 static int delta_encode_cost(const int *colors, int num, int bit_depth, in delta_encode_cost() argument 47 int bits_cost = bit_depth; in delta_encode_cost() 52 const int min_bits = bit_depth - 3; in delta_encode_cost() 60 assert(bits_per_delta <= bit_depth); in delta_encode_cost() 61 int range = (1 << bit_depth) - colors[0] - min_val; in delta_encode_cost() 99 int bit_depth, int *zero_count, in av1_get_palette_delta_bits_v() argument 102 const int max_val = 1 << bit_depth; in av1_get_palette_delta_bits_v() 104 *min_bits = bit_depth - 4; in av1_get_palette_delta_bits_v() 119 int bit_depth) { in av1_palette_color_cost_y() argument 127 n_cache + delta_encode_cost(out_cache_colors, n_out_cache, bit_depth, 1); in av1_palette_color_cost_y() [all …]
|
D | ratectrl.c | 49 #define ASSIGN_MINQ_TABLE(bit_depth, name) \ argument 51 switch (bit_depth) { \ 100 aom_bit_depth_t bit_depth) { in get_minq_index() argument 107 return av1_find_qindex(minqtarget, bit_depth, 0, QINDEX_RANGE - 1); in get_minq_index() 112 aom_bit_depth_t bit_depth) { in init_minq_luts() argument 115 const double maxq = av1_convert_qindex_to_q(i, bit_depth); in init_minq_luts() 116 kf_low_m[i] = get_minq_index(maxq, 0.000001, -0.0004, 0.150, bit_depth); in init_minq_luts() 117 kf_high_m[i] = get_minq_index(maxq, 0.0000021, -0.00125, 0.45, bit_depth); in init_minq_luts() 118 arfgf_low[i] = get_minq_index(maxq, 0.0000015, -0.0009, 0.30, bit_depth); in init_minq_luts() 119 arfgf_high[i] = get_minq_index(maxq, 0.0000021, -0.00125, 0.55, bit_depth); in init_minq_luts() [all …]
|
/external/libpng/contrib/libtests/ |
D | makepng.c | 201 pixel_depth_of_type(int color_type, int bit_depth) in pixel_depth_of_type() argument 203 return channels_of_type(color_type) * bit_depth; in pixel_depth_of_type() 207 image_size_of_type(int color_type, int bit_depth, unsigned int *colors, in image_size_of_type() argument 215 int pixel_depth = pixel_depth_of_type(color_type, bit_depth); in image_size_of_type() 249 generate_palette(png_colorp palette, png_bytep trans, int bit_depth, in generate_palette() argument 289 if (bit_depth == 1) in generate_palette() 298 unsigned int size = 1U << (bit_depth/2); /* 2, 4 or 16 */ in generate_palette() 329 set_value(png_bytep row, size_t rowbytes, png_uint_32 x, unsigned int bit_depth, in set_value() argument 332 unsigned int mask = (1U << bit_depth)-1; in set_value() 334 x *= bit_depth; /* Maximum x is 4*1024, maximum bit_depth is 16 */ in set_value() [all …]
|
/external/libhevc/common/ |
D | ihevc_hbd_deblk_edge_filter.c | 113 UWORD8 bit_depth) in ihevc_hbd_deblk_luma_vert() argument 137 beta = gai4_ihevc_beta_table[beta_indx] * (1 << (bit_depth - 8)); in ihevc_hbd_deblk_luma_vert() 138 tc = gai4_ihevc_tc_table[tc_indx] * (1 << (bit_depth - 8)); in ihevc_hbd_deblk_luma_vert() 251 tmp_p0 = CLIP3(pu2_src[-1] + delta, 0, ((1 << bit_depth) - 1)); in ihevc_hbd_deblk_luma_vert() 252 tmp_q0 = CLIP3(pu2_src[0] - delta, 0, ((1 << bit_depth) - 1)); in ihevc_hbd_deblk_luma_vert() 259 tmp_p1 = CLIP3(pu2_src[-2] + delta_p, 0, ((1 << bit_depth) - 1)); in ihevc_hbd_deblk_luma_vert() 268 tmp_q1 = CLIP3(pu2_src[1] + delta_q, 0, ((1 << bit_depth) - 1)); in ihevc_hbd_deblk_luma_vert() 348 UWORD8 bit_depth) in ihevc_hbd_deblk_luma_horz() argument 372 beta = gai4_ihevc_beta_table[beta_indx] * (1 << (bit_depth - 8)); in ihevc_hbd_deblk_luma_horz() 373 tc = gai4_ihevc_tc_table[tc_indx] * (1 << (bit_depth - 8)); in ihevc_hbd_deblk_luma_horz() [all …]
|
D | ihevc_iquant_recon.c | 125 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 …]
|
D | ihevc_trans_macros.h | 41 …WORD32 bit_depth,transform_shift; … 46 …bit_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; … 96 …bit_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; …
|
D | ihevc_chroma_iquant_recon.c | 131 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()
|
D | ihevc_sao.c | 202 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 …]
|
D | ihevc_quant_iquant_ssd.c | 140 WORD32 bit_depth,shift_iq; in ihevc_quant_iquant_ssd() local 153 bit_depth = 8 + 0; in ihevc_quant_iquant_ssd() 154 shift_iq = bit_depth + log2_size - 5; in ihevc_quant_iquant_ssd() 329 WORD32 bit_depth,shift_iq; in ihevc_quant_iquant() local 341 bit_depth = 8; in ihevc_quant_iquant() 342 shift_iq = bit_depth + log2_size - 5; in ihevc_quant_iquant() 509 WORD32 bit_depth,shift_iq; in ihevc_quant_iquant_ssd_rdoq() local 521 bit_depth = 8 + 0; in ihevc_quant_iquant_ssd_rdoq() 522 shift_iq = bit_depth + log2_size - 5; in ihevc_quant_iquant_ssd_rdoq() 654 WORD32 bit_depth,shift_iq; in ihevc_quant_iquant_rdoq() local [all …]
|
D | ihevc_intra_pred.h | 169 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 …]
|
/external/libpng/contrib/pngminus/ |
D | pnm2png.c | 224 volatile int bit_depth = 0; in pnm2png() local 254 bit_depth = 1; in pnm2png() 276 bit_depth = 1; in pnm2png() 278 bit_depth = 2; in pnm2png() 280 bit_depth = 4; in pnm2png() 282 bit_depth = 8; in pnm2png() 284 bit_depth = 16; in pnm2png() 300 bit_depth = 1; in pnm2png() 302 bit_depth = 2; in pnm2png() 304 bit_depth = 4; in pnm2png() [all …]
|
D | png2pnm.c | 219 int bit_depth; in png2pnm() local 266 &width, &height, &bit_depth, &color_type, in png2pnm() 275 if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) in png2pnm() 283 if (bit_depth == 16) in png2pnm() 300 png_get_IHDR (png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, in png2pnm() 304 if (bit_depth == 16) in png2pnm() 378 fprintf (pnm_file, "%ld\n", ((1L << (int) bit_depth) - 1L)); in png2pnm() 385 fprintf (pnm_file, "%ld\n", ((1L << (int) bit_depth) - 1L)); in png2pnm() 396 fprintf (alpha_file, "%ld\n", ((1L << (int) bit_depth) - 1L)); in png2pnm() 411 if (bit_depth == 16){ in png2pnm() [all …]
|
/external/libaom/libaom/test/ |
D | y4m_test.cc | 32 unsigned int bit_depth; member 80 void HeaderChecks(unsigned int bit_depth, aom_img_fmt_t fmt) { in HeaderChecks() argument 86 ASSERT_EQ(y4m_.bit_depth, bit_depth); in HeaderChecks() 89 ASSERT_EQ(y4m_.bps, (int)y4m_.bit_depth * 3 / 2); in HeaderChecks() 94 ASSERT_EQ(y4m_.bps, (int)y4m_.bit_depth * 2); in HeaderChecks() 99 ASSERT_EQ(y4m_.bps, (int)y4m_.bit_depth * 3); in HeaderChecks() 120 HeaderChecks(t.bit_depth, t.format); in TEST_P() 153 y4m_.bit_depth); in WriteY4mAndReadBack() 174 HeaderChecks(t.bit_depth, t.format); in TEST_P()
|
/external/libaom/libaom/common/ |
D | y4menc.c | 18 static const char *monochrome_colorspace(unsigned int bit_depth) { in monochrome_colorspace() argument 19 switch (bit_depth) { in monochrome_colorspace() 49 static const char *colorspace(unsigned int bit_depth, in colorspace() argument 52 switch (bit_depth) { in colorspace() 86 unsigned int bit_depth) { in y4m_write_file_header() argument 87 const char *color = monochrome ? monochrome_colorspace(bit_depth) in y4m_write_file_header() 88 : colorspace(bit_depth, csp, fmt); in y4m_write_file_header()
|
/external/libaom/libaom/aom_dsp/ |
D | grain_synthesis.c | 409 int bit_depth = params->bit_depth; in generate_luma_grain_block() local 410 int gauss_sec_shift = 12 - bit_depth + params->grain_scale_shift; in generate_luma_grain_block() 447 int bit_depth = params->bit_depth; in generate_chroma_grain_blocks() local 448 int gauss_sec_shift = 12 - bit_depth + params->grain_scale_shift; in generate_chroma_grain_blocks() 561 static int scale_LUT(int *scaling_lut, int index, int bit_depth) { in scale_LUT() argument 562 int x = index >> (bit_depth - 8); in scale_LUT() 564 if (!(bit_depth - 8) || x == 255) in scale_LUT() 568 (index & ((1 << (bit_depth - 8)) - 1)) + in scale_LUT() 569 (1 << (bit_depth - 9))) >> in scale_LUT() 570 (bit_depth - 8)); in scale_LUT() [all …]
|
/external/libvpx/libvpx/test/ |
D | y4m_test.cc | 31 unsigned int bit_depth; member 92 void HeaderChecks(unsigned int bit_depth, vpx_img_fmt_t fmt) { in HeaderChecks() argument 98 ASSERT_EQ(y4m_.bit_depth, bit_depth); in HeaderChecks() 101 ASSERT_EQ(y4m_.bps, (int)y4m_.bit_depth * 3 / 2); in HeaderChecks() 106 ASSERT_EQ(y4m_.bps, (int)y4m_.bit_depth * 2); in HeaderChecks() 111 ASSERT_EQ(y4m_.bps, (int)y4m_.bit_depth * 3); in HeaderChecks() 132 HeaderChecks(t.bit_depth, t.format); in TEST_P() 164 y4m_.vpx_fmt, y4m_.bit_depth); in WriteY4mAndReadBack() 185 HeaderChecks(t.bit_depth, t.format); in TEST_P()
|
/external/libvpx/libvpx/tools/ |
D | tiny_ssim.c | 102 int bit_depth; member 108 int h, int bit_depth) { in open_input_file() argument 113 input->bit_depth = bit_depth; in open_input_file() 126 input->bit_depth = input->y4m.bit_depth; in open_input_file() 137 if (bit_depth > 8) { in open_input_file() 320 int bit_depth = 8; in main() local 346 sscanf(argv[6], "%d", &bit_depth); in main() 349 if (open_input_file(argv[1], &in[0], w, h, bit_depth) < 0) { in main() 358 bit_depth = in[0].bit_depth; in main() 360 if (bit_depth == 10) peak = 1023.0; in main() [all …]
|
/external/libaom/libaom/av1/common/ |
D | quant_common.c | 193 int16_t av1_dc_quant_Q3(int qindex, int delta, aom_bit_depth_t bit_depth) { in av1_dc_quant_Q3() argument 195 switch (bit_depth) { in av1_dc_quant_Q3() 205 int16_t av1_ac_quant_Q3(int qindex, int delta, aom_bit_depth_t bit_depth) { in av1_ac_quant_Q3() argument 207 switch (bit_depth) { in av1_ac_quant_Q3() 220 int16_t av1_dc_quant_QTX(int qindex, int delta, aom_bit_depth_t bit_depth) { in av1_dc_quant_QTX() argument 221 return av1_dc_quant_Q3(qindex, delta, bit_depth); in av1_dc_quant_QTX() 224 int16_t av1_ac_quant_QTX(int qindex, int delta, aom_bit_depth_t bit_depth) { in av1_ac_quant_QTX() argument 225 return av1_ac_quant_Q3(qindex, delta, bit_depth); in av1_ac_quant_QTX()
|
/external/libvpx/libvpx/vp9/common/ |
D | vp9_quant_common.c | 164 int16_t vp9_dc_quant(int qindex, int delta, vpx_bit_depth_t bit_depth) { in vp9_dc_quant() argument 166 switch (bit_depth) { in vp9_dc_quant() 175 (void)bit_depth; in vp9_dc_quant() 180 int16_t vp9_ac_quant(int qindex, int delta, vpx_bit_depth_t bit_depth) { in vp9_ac_quant() argument 182 switch (bit_depth) { in vp9_ac_quant() 191 (void)bit_depth; in vp9_ac_quant()
|
/external/libpng/contrib/gregbook/ |
D | readpng.c | 73 int bit_depth, color_type; variable 139 png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, in readpng_init() 183 if (bit_depth == 16) { in readpng_get_bgcolor() 187 } else if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) { in readpng_get_bgcolor() 188 if (bit_depth == 1) in readpng_get_bgcolor() 190 else if (bit_depth == 2) in readpng_get_bgcolor() 234 if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) in readpng_get_image() 239 if (bit_depth == 16) in readpng_get_image()
|