Lines Matching refs:xsize
50 static int DistanceToPlaneCode(int xsize, int dist) { in DistanceToPlaneCode() argument
51 const int yoffset = dist / xsize; in DistanceToPlaneCode()
52 const int xoffset = dist - yoffset * xsize; in DistanceToPlaneCode()
55 } else if (xoffset > xsize - 8 && yoffset < 7) { in DistanceToPlaneCode()
56 return plane_to_code_lut[(yoffset + 1) * 16 + 8 + (xsize - xoffset)] + 1; in DistanceToPlaneCode()
226 static void GetParamsForHashChainFindCopy(int quality, int xsize, in GetParamsForHashChainFindCopy() argument
233 : (quality > 25) ? (xsize << 8) in GetParamsForHashChainFindCopy()
234 : (xsize << 4); in GetParamsForHashChainFindCopy()
235 assert(xsize > 0); in GetParamsForHashChainFindCopy()
254 const uint32_t xsize = (uint32_t)xsize_signed; in HashChainFindCopy() local
258 assert(xsize > 0); in HashChainFindCopy()
288 if (distance < 9 * xsize) { in HashChainFindCopy()
289 const uint32_t y = distance / xsize; in HashChainFindCopy()
290 uint32_t x = distance % xsize; in HashChainFindCopy()
291 if (x > (xsize >> 1)) { in HashChainFindCopy()
292 x = xsize - x; in HashChainFindCopy()
306 if ((best_distance == 1 || distance == xsize) && in HashChainFindCopy()
327 static int BackwardReferencesRle(int xsize, int ysize, in BackwardReferencesRle() argument
330 const int pix_count = xsize * ysize; in BackwardReferencesRle()
349 static int BackwardReferencesHashChain(int xsize, int ysize, in BackwardReferencesHashChain() argument
358 const int pix_count = xsize * ysize; in BackwardReferencesHashChain()
370 GetParamsForHashChainFindCopy(quality, xsize, cache_bits, in BackwardReferencesHashChain()
379 HashChainFindCopy(hash_chain, i, xsize, argb, max_len, in BackwardReferencesHashChain()
392 HashChainFindCopy(hash_chain, i + 1, xsize, argb, max_len, in BackwardReferencesHashChain()
464 int xsize, int ysize, int recursive_cost_model,
490 static int CostModelBuild(CostModel* const m, int xsize, int ysize, in CostModelBuild() argument
500 if (!BackwardReferencesTraceBackwards(xsize, ysize, recursion_level - 1, in CostModelBuild()
506 if (!BackwardReferencesHashChain(xsize, ysize, argb, cache_bits, quality, in CostModelBuild()
561 int xsize, int ysize, int recursive_cost_model, const uint32_t* const argb, in BackwardReferencesHashChainDistanceOnly() argument
567 const int pix_count = xsize * ysize; in BackwardReferencesHashChainDistanceOnly()
587 if (!CostModelBuild(cost_model, xsize, ysize, recursive_cost_model, argb, in BackwardReferencesHashChainDistanceOnly()
597 GetParamsForHashChainFindCopy(quality, xsize, cache_bits, in BackwardReferencesHashChainDistanceOnly()
611 HashChainFindCopy(hash_chain, i, xsize, argb, max_len, in BackwardReferencesHashChainDistanceOnly()
616 const int code = DistanceToPlaneCode(xsize, offset); in BackwardReferencesHashChainDistanceOnly()
702 int xsize, int ysize, const uint32_t* const argb, in BackwardReferencesHashChainFollowChosenPath() argument
707 const int pix_count = xsize * ysize; in BackwardReferencesHashChainFollowChosenPath()
726 GetParamsForHashChainFindCopy(quality, xsize, cache_bits, in BackwardReferencesHashChainFollowChosenPath()
734 HashChainFindCopy(hash_chain, i, xsize, argb, max_len, in BackwardReferencesHashChainFollowChosenPath()
775 static int BackwardReferencesTraceBackwards(int xsize, int ysize, in BackwardReferencesTraceBackwards() argument
782 const int dist_array_size = xsize * ysize; in BackwardReferencesTraceBackwards()
791 xsize, ysize, recursive_cost_model, argb, quality, cache_bits, hash_chain, in BackwardReferencesTraceBackwards()
797 xsize, ysize, argb, quality, cache_bits, chosen_path, chosen_path_size, in BackwardReferencesTraceBackwards()
807 static void BackwardReferences2DLocality(int xsize, in BackwardReferences2DLocality() argument
813 const int transformed_dist = DistanceToPlaneCode(xsize, dist); in BackwardReferences2DLocality()
881 int xsize, int ysize, in ComputeCacheEntropy() argument
923 assert(pixel_index == xsize * ysize); in ComputeCacheEntropy()
924 (void)xsize; // xsize is not used in non-debug compilations otherwise. in ComputeCacheEntropy()
937 int xsize, int ysize, int quality, in VP8LCalculateEstimateForCacheSize() argument
948 if (!BackwardReferencesHashChain(xsize, ysize, argb, 0, quality, hash_chain, in VP8LCalculateEstimateForCacheSize()
956 ComputeCacheEntropy(argb, xsize, ysize, refs, cache_bits_low); in VP8LCalculateEstimateForCacheSize()
961 ComputeCacheEntropy(argb, xsize, ysize, refs, cache_bits_high); in VP8LCalculateEstimateForCacheSize()