Lines Matching refs:priv
67 static void YCrCB_to_YUV420P_1x1(struct jdec_private *priv, int sx, int sy) in YCrCB_to_YUV420P_1x1() argument
73 p = priv->plane[0]; in YCrCB_to_YUV420P_1x1()
74 y = priv->Y; in YCrCB_to_YUV420P_1x1()
78 p += priv->bytes_per_row[0]; in YCrCB_to_YUV420P_1x1()
82 p = priv->plane[1]; in YCrCB_to_YUV420P_1x1()
83 s = priv->Cb; in YCrCB_to_YUV420P_1x1()
91 p += priv->bytes_per_row[1] - 4; in YCrCB_to_YUV420P_1x1()
94 p = priv->plane[2]; in YCrCB_to_YUV420P_1x1()
95 s = priv->Cr; in YCrCB_to_YUV420P_1x1()
103 p += priv->bytes_per_row[2] - 4; in YCrCB_to_YUV420P_1x1()
113 static void YCrCB_to_YUV420P_2x1(struct jdec_private *priv, int sx, int sy) in YCrCB_to_YUV420P_2x1() argument
119 p = priv->plane[0]; in YCrCB_to_YUV420P_2x1()
120 y1 = priv->Y; in YCrCB_to_YUV420P_2x1()
124 p += priv->bytes_per_row[0]; in YCrCB_to_YUV420P_2x1()
130 p = priv->plane[1]; in YCrCB_to_YUV420P_2x1()
131 s = priv->Cb; in YCrCB_to_YUV420P_2x1()
136 p += priv->bytes_per_row[1]; in YCrCB_to_YUV420P_2x1()
139 p = priv->plane[2]; in YCrCB_to_YUV420P_2x1()
140 s = priv->Cr; in YCrCB_to_YUV420P_2x1()
145 p += priv->bytes_per_row[2]; in YCrCB_to_YUV420P_2x1()
158 static void YCrCB_to_YUV420P_1x2(struct jdec_private *priv, int sx, int sy) in YCrCB_to_YUV420P_1x2() argument
164 p = priv->plane[0]; in YCrCB_to_YUV420P_1x2()
165 y = priv->Y; in YCrCB_to_YUV420P_1x2()
169 p+=priv->bytes_per_row[0]; in YCrCB_to_YUV420P_1x2()
173 pr = priv->plane[1]; in YCrCB_to_YUV420P_1x2()
174 s = priv->Cb; in YCrCB_to_YUV420P_1x2()
182 pr += priv->bytes_per_row[1]; in YCrCB_to_YUV420P_1x2()
185 pr = priv->plane[2]; in YCrCB_to_YUV420P_1x2()
186 s = priv->Cr; in YCrCB_to_YUV420P_1x2()
194 pr += priv->bytes_per_row[2] - 4; in YCrCB_to_YUV420P_1x2()
206 static void YCrCB_to_YUV420P_2x2(struct jdec_private *priv, int sx, int sy) in YCrCB_to_YUV420P_2x2() argument
212 p = priv->plane[0]; in YCrCB_to_YUV420P_2x2()
213 y1 = priv->Y; in YCrCB_to_YUV420P_2x2()
217 p += priv->bytes_per_row[0]; in YCrCB_to_YUV420P_2x2()
223 p = priv->plane[1]; in YCrCB_to_YUV420P_2x2()
224 s = priv->Cb; in YCrCB_to_YUV420P_2x2()
229 p += priv->bytes_per_row[1]; in YCrCB_to_YUV420P_2x2()
232 p = priv->plane[2]; in YCrCB_to_YUV420P_2x2()
233 s = priv->Cr; in YCrCB_to_YUV420P_2x2()
238 p += priv->bytes_per_row[2]; in YCrCB_to_YUV420P_2x2()
242 static int initialize_yuv420p(struct jdec_private *priv, in initialize_yuv420p() argument
246 int half_height = (priv->height + 1) >> 2; in initialize_yuv420p()
247 int half_width = (priv->width + 1) >> 2; in initialize_yuv420p()
249 if (!priv->bytes_per_row[0]) in initialize_yuv420p()
250 priv->bytes_per_row[0] = priv->width; in initialize_yuv420p()
251 if (!priv->components[0]) in initialize_yuv420p()
252 priv->components[0] = malloc(priv->height * priv->bytes_per_row[0]); in initialize_yuv420p()
254 if (!priv->bytes_per_row[1]) in initialize_yuv420p()
255 priv->bytes_per_row[1] = half_width; in initialize_yuv420p()
256 if (!priv->components[1]) in initialize_yuv420p()
257 priv->components[1] = malloc(half_height * priv->bytes_per_row[1]); in initialize_yuv420p()
259 if (!priv->bytes_per_row[2]) in initialize_yuv420p()
260 priv->bytes_per_row[2] = half_width; in initialize_yuv420p()
261 if (!priv->components[2]) in initialize_yuv420p()
262 priv->components[2] = malloc(half_height * priv->bytes_per_row[2]); in initialize_yuv420p()
268 bytes_per_blocklines[0] = priv->width << 3; in initialize_yuv420p()
273 return !priv->components[0] || !priv->components[1] || !priv->components[2]; in initialize_yuv420p()