void dct_quantize_row(uint8_t *in_data, uint8_t *prediction, int w, int h, int16_t *out_data, uint8_t *quantization) { int x; int16_t block[8*8]; /* Perform the DCT and quantization */ for(x = 0; x < w; x += 8) { int i,j; for (i=0; i<8; ++i) for (j=0; j<8; ++j) block[i*8+j] = ((int16_t)in_data[i*w+j+x] - prediction[i*w+j+x]); /* Store MBs linear in memory, i.e. the 64 coefficients are stored continous. * This allows us to ignore stride in DCT/iDCT and other functions. */ dct_quant_block_8x8(block, out_data+(x*8), quantization); // DEBUG static int first = 1; if (first) { // print_block_ble(out_data); print_common(block); first = 0; } // DEBUG } }
static int print_group(gid_t id, const char *prefix) { return print_common(id, gid2group(id), prefix); }
static int print_user(uid_t id, const char *prefix) { return print_common(id, uid2uname(id), prefix); }
static int print_struct(smbios_hdl_t *shp, const smbios_struct_t *sp, void *fp) { smbios_info_t info; int hex = opt_x; const char *s; if (opt_t != -1 && opt_t != sp->smbstr_type) return (0); /* skip struct if type doesn't match -t */ if (!opt_O && (sp->smbstr_type == SMB_TYPE_MEMCTL || sp->smbstr_type == SMB_TYPE_MEMMOD)) return (0); /* skip struct if type is obsolete */ if (g_hdr++ == 0 || !opt_s) oprintf(fp, "%-5s %-4s %s\n", "ID", "SIZE", "TYPE"); oprintf(fp, "%-5u %-4lu", (uint_t)sp->smbstr_id, (ulong_t)sp->smbstr_size); if ((s = smbios_type_name(sp->smbstr_type)) != NULL) oprintf(fp, " %s (type %u)", s, sp->smbstr_type); else if (sp->smbstr_type > SMB_TYPE_OEM_LO && sp->smbstr_type < SMB_TYPE_OEM_HI) oprintf(fp, " %s+%u (type %u)", "SMB_TYPE_OEM_LO", sp->smbstr_type - SMB_TYPE_OEM_LO, sp->smbstr_type); else oprintf(fp, " %u", sp->smbstr_type); if ((s = smbios_type_desc(sp->smbstr_type)) != NULL) oprintf(fp, " (%s)\n", s); else oprintf(fp, "\n"); if (opt_s) return (0); /* only print header line if -s specified */ if (smbios_info_common(shp, sp->smbstr_id, &info) == 0) { oprintf(fp, "\n"); print_common(&info, fp); } switch (sp->smbstr_type) { case SMB_TYPE_BIOS: oprintf(fp, "\n"); print_bios(shp, fp); break; case SMB_TYPE_SYSTEM: oprintf(fp, "\n"); print_system(shp, fp); break; case SMB_TYPE_BASEBOARD: oprintf(fp, "\n"); print_bboard(shp, sp->smbstr_id, fp); break; case SMB_TYPE_CHASSIS: oprintf(fp, "\n"); print_chassis(shp, sp->smbstr_id, fp); break; case SMB_TYPE_PROCESSOR: oprintf(fp, "\n"); print_processor(shp, sp->smbstr_id, fp); break; case SMB_TYPE_CACHE: oprintf(fp, "\n"); print_cache(shp, sp->smbstr_id, fp); break; case SMB_TYPE_PORT: oprintf(fp, "\n"); print_port(shp, sp->smbstr_id, fp); break; case SMB_TYPE_SLOT: oprintf(fp, "\n"); print_slot(shp, sp->smbstr_id, fp); break; case SMB_TYPE_OBDEVS: oprintf(fp, "\n"); print_obdevs(shp, sp->smbstr_id, fp); break; case SMB_TYPE_OEMSTR: case SMB_TYPE_SYSCONFSTR: oprintf(fp, "\n"); print_strtab(shp, sp->smbstr_id, fp); break; case SMB_TYPE_LANG: oprintf(fp, "\n"); print_lang(shp, sp->smbstr_id, fp); break; case SMB_TYPE_EVENTLOG: oprintf(fp, "\n"); print_evlog(shp, sp->smbstr_id, fp); break; case SMB_TYPE_MEMARRAY: oprintf(fp, "\n"); print_memarray(shp, sp->smbstr_id, fp); break; case SMB_TYPE_MEMDEVICE: oprintf(fp, "\n"); print_memdevice(shp, sp->smbstr_id, fp); break; case SMB_TYPE_MEMARRAYMAP: oprintf(fp, "\n"); print_memarrmap(shp, sp->smbstr_id, fp); break; case SMB_TYPE_MEMDEVICEMAP: oprintf(fp, "\n"); print_memdevmap(shp, sp->smbstr_id, fp); break; case SMB_TYPE_SECURITY: oprintf(fp, "\n"); print_hwsec(shp, fp); break; case SMB_TYPE_BOOT: oprintf(fp, "\n"); print_boot(shp, fp); break; case SMB_TYPE_IPMIDEV: oprintf(fp, "\n"); print_ipmi(shp, fp); break; case SMB_TYPE_OBDEVEXT: oprintf(fp, "\n"); print_obdevs_ext(shp, sp->smbstr_id, fp); break; case SUN_OEM_EXT_PROCESSOR: oprintf(fp, "\n"); print_extprocessor(shp, sp->smbstr_id, fp); break; case SUN_OEM_EXT_PORT: oprintf(fp, "\n"); print_extport(shp, sp->smbstr_id, fp); break; case SUN_OEM_PCIEXRC: oprintf(fp, "\n"); print_pciexrc(shp, sp->smbstr_id, fp); break; case SUN_OEM_EXT_MEMARRAY: oprintf(fp, "\n"); print_extmemarray(shp, sp->smbstr_id, fp); break; case SUN_OEM_EXT_MEMDEVICE: oprintf(fp, "\n"); print_extmemdevice(shp, sp->smbstr_id, fp); break; default: hex++; } if (hex) print_bytes(sp->smbstr_data, sp->smbstr_size, fp); else oprintf(fp, "\n"); return (0); }