Lines Matching full:xsize
57 static int DistanceToPlaneCode(int xsize, int dist) {
58 const int yoffset = dist / xsize;
59 const int xoffset = dist - yoffset * xsize;
62 } else if (xoffset > xsize - 8 && yoffset < 7) {
63 return plane_to_code_lut[(yoffset + 1) * 16 + 8 + (xsize - xoffset)] + 1;
146 static void GetParamsForHashChainFindCopy(int quality, int xsize,
153 : (quality > 25) ? (xsize << 8)
154 : (xsize << 4);
155 assert(xsize > 0);
174 const uint32_t xsize = (uint32_t)xsize_signed;
178 assert(xsize > 0);
201 if (distance < 9 * xsize) {
202 const uint32_t y = distance / xsize;
203 uint32_t x = distance % xsize;
204 if (x > (xsize >> 1)) {
205 x = xsize - x;
219 if ((best_distance == 1 || distance == xsize) &&
242 static void BackwardReferencesRle(int xsize, int ysize,
245 const int pix_count = xsize * ysize;
263 static int BackwardReferencesHashChain(int xsize, int ysize,
271 const int pix_count = xsize * ysize;
287 GetParamsForHashChainFindCopy(quality, xsize, cache_bits,
298 HashChainFindCopy(hash_chain, i, xsize, argb, maxlen,
314 HashChainFindCopy(hash_chain, i + 1, xsize, argb, maxlen,
385 int xsize, int ysize, int recursive_cost_model,
410 static int CostModelBuild(CostModel* const m, int xsize, int ysize,
417 if (!VP8LBackwardRefsAlloc(&refs, xsize * ysize)) goto Error;
420 if (!BackwardReferencesTraceBackwards(xsize, ysize, recursion_level - 1,
425 if (!BackwardReferencesHashChain(xsize, ysize, argb, cache_bits, quality,
475 int xsize, int ysize, int recursive_cost_model, const uint32_t* const argb,
480 const int pix_count = xsize * ysize;
503 if (!CostModelBuild(cost_model, xsize, ysize, recursive_cost_model, argb,
513 GetParamsForHashChainFindCopy(quality, xsize, cache_bits,
529 HashChainFindCopy(hash_chain, i, xsize, argb, maxlen,
534 const int code = DistanceToPlaneCode(xsize, offset);
621 int xsize, int ysize, const uint32_t* const argb,
625 const int pix_count = xsize * ysize;
648 GetParamsForHashChainFindCopy(quality, xsize, cache_bits,
655 HashChainFindCopy(hash_chain, i, xsize, argb, maxlen,
697 static int BackwardReferencesTraceBackwards(int xsize, int ysize,
703 const int dist_array_size = xsize * ysize;
712 xsize, ysize, recursive_cost_model, argb, quality, cache_bits,
718 xsize, ysize, argb, quality, cache_bits, chosen_path, chosen_path_size,
728 static void BackwardReferences2DLocality(int xsize,
734 const int transformed_dist = DistanceToPlaneCode(xsize, dist);
819 int xsize, int ysize,
857 assert(pixel_index == xsize * ysize);
858 (void)xsize; // xsize is not used in non-debug compilations otherwise.
866 int xsize, int ysize,
874 if (!VP8LBackwardRefsAlloc(&refs, xsize * ysize) ||
875 !BackwardReferencesHashChain(xsize, ysize, argb, 0, quality, &refs)) {
882 ComputeCacheHistogram(argb, xsize, ysize, &refs, cache_bits, &histo);