Home | History | Annotate | Download | only in enc

Lines Matching refs:pic

86 void WebPCleanupTransparentArea(WebPPicture* pic) {
88 if (pic == NULL) return;
89 w = pic->width / SIZE;
90 h = pic->height / SIZE;
93 if (pic->use_argb) {
98 const int off = (y * pic->argb_stride + x) * SIZE;
99 if (IsTransparentARGBArea(pic->argb + off, pic->argb_stride, SIZE)) {
101 argb_value = pic->argb[off];
104 FlattenARGB(pic->argb + off, argb_value, pic->argb_stride, SIZE);
111 const int width = pic->width;
112 const int height = pic->height;
113 const int y_stride = pic->y_stride;
114 const int uv_stride = pic->uv_stride;
115 const int a_stride = pic->a_stride;
116 uint8_t* y_ptr = pic->y;
117 uint8_t* u_ptr = pic->u;
118 uint8_t* v_ptr = pic->v;
119 const uint8_t* a_ptr = pic->a;
168 void WebPCleanupTransparentAreaLossless(WebPPicture* const pic) {
171 assert(pic != NULL && pic->use_argb);
172 w = pic->width;
173 h = pic->height;
174 argb = pic->argb;
182 argb += pic->argb_stride;
198 void WebPBlendAlpha(WebPPicture* pic, uint32_t background_rgb) {
203 if (pic == NULL) return;
204 if (!pic->use_argb) {
205 const int uv_width = (pic->width >> 1); // omit last pixel during u/v loop
210 const int has_alpha = pic->colorspace & WEBP_CSP_ALPHA_BIT;
211 uint8_t* y_ptr = pic->y;
212 uint8_t* u_ptr = pic->u;
213 uint8_t* v_ptr = pic->v;
214 uint8_t* a_ptr = pic->a;
216 for (y = 0; y < pic->height; ++y) {
218 for (x = 0; x < pic->width; ++x) {
227 (y + 1 == pic->height) ? a_ptr : a_ptr + pic->a_stride;
237 if (pic->width & 1) { // rightmost pixel
243 u_ptr += pic->uv_stride;
244 v_ptr += pic->uv_stride;
246 memset(a_ptr, 0xff, pic->width); // reset alpha value to opaque
247 a_ptr += pic->a_stride;
248 y_ptr += pic->y_stride;
251 uint32_t* argb = pic->argb;
253 for (y = 0; y < pic->height; ++y) {
254 for (x = 0; x < pic->width; ++x) {
270 argb += pic->argb_stride;