Lines Matching refs:pic
31 int WebPImportGray(const uint8_t* gray_data, WebPPicture* pic) { in WebPImportGray() argument
33 if (pic == NULL || gray_data == NULL) return 0; in WebPImportGray()
34 pic->colorspace = WEBP_YUV420; in WebPImportGray()
35 if (!WebPPictureAlloc(pic)) return 0; in WebPImportGray()
36 width = pic->width; in WebPImportGray()
38 for (y = 0; y < pic->height; ++y) { in WebPImportGray()
39 memcpy(pic->y + y * pic->y_stride, gray_data, width); in WebPImportGray()
42 memset(pic->u + (y >> 1) * pic->uv_stride, 128, uv_width); in WebPImportGray()
43 memset(pic->v + (y >> 1) * pic->uv_stride, 128, uv_width); in WebPImportGray()
49 int WebPImportRGB565(const uint8_t* rgb565, WebPPicture* pic) { in WebPImportRGB565() argument
52 if (pic == NULL || rgb565 == NULL) return 0; in WebPImportRGB565()
53 pic->colorspace = WEBP_YUV420; in WebPImportRGB565()
54 pic->use_argb = 1; in WebPImportRGB565()
55 if (!WebPPictureAlloc(pic)) return 0; in WebPImportRGB565()
56 dst = pic->argb; in WebPImportRGB565()
57 for (y = 0; y < pic->height; ++y) { in WebPImportRGB565()
58 const int width = pic->width; in WebPImportRGB565()
77 dst += pic->argb_stride; in WebPImportRGB565()
82 int WebPImportRGB4444(const uint8_t* rgb4444, WebPPicture* pic) { in WebPImportRGB4444() argument
85 if (pic == NULL || rgb4444 == NULL) return 0; in WebPImportRGB4444()
86 pic->colorspace = WEBP_YUV420; in WebPImportRGB4444()
87 pic->use_argb = 1; in WebPImportRGB4444()
88 if (!WebPPictureAlloc(pic)) return 0; in WebPImportRGB4444()
89 dst = pic->argb; in WebPImportRGB4444()
90 for (y = 0; y < pic->height; ++y) { in WebPImportRGB4444()
91 const int width = pic->width; in WebPImportRGB4444()
112 dst += pic->argb_stride; in WebPImportRGB4444()
119 WebPPicture* pic) { in WebPImportColorMappedARGB() argument
124 if (pic == NULL || indexed == NULL || indexed_stride < pic->width || in WebPImportColorMappedARGB()
128 pic->use_argb = 1; in WebPImportColorMappedARGB()
129 if (!WebPPictureAlloc(pic)) return 0; in WebPImportColorMappedARGB()
130 dst = pic->argb; in WebPImportColorMappedARGB()
131 for (y = 0; y < pic->height; ++y) { in WebPImportColorMappedARGB()
132 for (x = 0; x < pic->width; ++x) { in WebPImportColorMappedARGB()
135 WebPPictureFree(pic); in WebPImportColorMappedARGB()
141 dst += pic->argb_stride; in WebPImportColorMappedARGB()