• Home
  • Raw
  • Download

Lines Matching refs:wrk

22 void WebPRescalerInit(WebPRescaler* const wrk, int src_width, int src_height,  in WebPRescalerInit()  argument
28 wrk->x_expand = (src_width < dst_width); in WebPRescalerInit()
29 wrk->y_expand = (src_height < dst_height); in WebPRescalerInit()
30 wrk->src_width = src_width; in WebPRescalerInit()
31 wrk->src_height = src_height; in WebPRescalerInit()
32 wrk->dst_width = dst_width; in WebPRescalerInit()
33 wrk->dst_height = dst_height; in WebPRescalerInit()
34 wrk->src_y = 0; in WebPRescalerInit()
35 wrk->dst_y = 0; in WebPRescalerInit()
36 wrk->dst = dst; in WebPRescalerInit()
37 wrk->dst_stride = dst_stride; in WebPRescalerInit()
38 wrk->num_channels = num_channels; in WebPRescalerInit()
41 wrk->x_add = wrk->x_expand ? (x_sub - 1) : x_add; in WebPRescalerInit()
42 wrk->x_sub = wrk->x_expand ? (x_add - 1) : x_sub; in WebPRescalerInit()
43 if (!wrk->x_expand) { // fx_scale is not used otherwise in WebPRescalerInit()
44 wrk->fx_scale = WEBP_RESCALER_FRAC(1, wrk->x_sub); in WebPRescalerInit()
47 wrk->y_add = wrk->y_expand ? y_add - 1 : y_add; in WebPRescalerInit()
48 wrk->y_sub = wrk->y_expand ? y_sub - 1 : y_sub; in WebPRescalerInit()
49 wrk->y_accum = wrk->y_expand ? wrk->y_sub : wrk->y_add; in WebPRescalerInit()
50 if (!wrk->y_expand) { in WebPRescalerInit()
55 (uint64_t)dst_height * WEBP_RESCALER_ONE / (wrk->x_add * wrk->y_add); in WebPRescalerInit()
61 wrk->fxy_scale = 0; in WebPRescalerInit()
63 wrk->fxy_scale = (uint32_t)ratio; in WebPRescalerInit()
65 wrk->fy_scale = WEBP_RESCALER_FRAC(1, wrk->y_sub); in WebPRescalerInit()
67 wrk->fy_scale = WEBP_RESCALER_FRAC(1, wrk->x_add); in WebPRescalerInit()
70 wrk->irow = work; in WebPRescalerInit()
71 wrk->frow = work + num_channels * dst_width; in WebPRescalerInit()
110 int WebPRescaleNeededLines(const WebPRescaler* const wrk, int max_num_lines) { in WebPRescaleNeededLines() argument
111 const int num_lines = (wrk->y_accum + wrk->y_sub - 1) / wrk->y_sub; in WebPRescaleNeededLines()
115 int WebPRescalerImport(WebPRescaler* const wrk, int num_lines, in WebPRescalerImport() argument
118 while (total_imported < num_lines && !WebPRescalerHasPendingOutput(wrk)) { in WebPRescalerImport()
119 if (wrk->y_expand) { in WebPRescalerImport()
120 rescaler_t* const tmp = wrk->irow; in WebPRescalerImport()
121 wrk->irow = wrk->frow; in WebPRescalerImport()
122 wrk->frow = tmp; in WebPRescalerImport()
124 WebPRescalerImportRow(wrk, src); in WebPRescalerImport()
125 if (!wrk->y_expand) { // Accumulate the contribution of the new row. in WebPRescalerImport()
127 for (x = 0; x < wrk->num_channels * wrk->dst_width; ++x) { in WebPRescalerImport()
128 wrk->irow[x] += wrk->frow[x]; in WebPRescalerImport()
131 ++wrk->src_y; in WebPRescalerImport()
134 wrk->y_accum -= wrk->y_sub; in WebPRescalerImport()