Home | History | Annotate | Download | only in enc

Lines Matching refs:pic

335 int WebPEncodingSetError(const WebPPicture* const pic,
339 ((WebPPicture*)pic)->error_code = error;
343 int WebPReportProgress(const WebPPicture* const pic,
347 if (pic->progress_hook && !pic->progress_hook(percent, pic)) {
349 WebPEncodingSetError(pic, VP8_ENC_ERROR_USER_ABORT);
357 int WebPEncode(const WebPConfig* config, WebPPicture* pic) {
360 if (pic == NULL)
362 WebPEncodingSetError(pic, VP8_ENC_OK); // all ok so far
364 return WebPEncodingSetError(pic, VP8_ENC_ERROR_NULL_PARAMETER);
366 return WebPEncodingSetError(pic, VP8_ENC_ERROR_INVALID_CONFIGURATION);
367 if (pic->width <= 0 || pic->height <= 0)
368 return WebPEncodingSetError(pic, VP8_ENC_ERROR_BAD_DIMENSION);
369 if (pic->width > WEBP_MAX_DIMENSION || pic->height > WEBP_MAX_DIMENSION)
370 return WebPEncodingSetError(pic, VP8_ENC_ERROR_BAD_DIMENSION);
372 if (pic->stats != NULL) memset(pic->stats, 0, sizeof(*pic->stats));
376 if (pic->y == NULL || pic->u == NULL || pic->v == NULL) {
377 if (pic->argb != NULL) {
378 if (!WebPPictureARGBToYUVA(pic, WEBP_YUV420)) return 0;
380 return WebPEncodingSetError(pic, VP8_ENC_ERROR_NULL_PARAMETER);
384 enc = InitVP8Encoder(config, pic);
385 if (enc == NULL) return 0; // pic->error is already set.
408 if (pic->argb == NULL)
409 return WebPEncodingSetError(pic, VP8_ENC_ERROR_NULL_PARAMETER);
411 ok = VP8LEncodeImage(config, pic); // Sets pic->error in case of problem.