Lines Matching refs:avctx
60 static av_cold int libwebp_encode_init(AVCodecContext *avctx)
62 LibWebPContext *s = avctx->priv_data;
65 if (avctx->global_quality < 0)
66 avctx->global_quality = 75 * FF_QP2LAMBDA;
67 s->quality = av_clipf(avctx->global_quality / (float)FF_QP2LAMBDA,
70 if (avctx->compression_level < 0 || avctx->compression_level > 6) {
71 av_log(avctx, AV_LOG_WARNING, "invalid compression level: %d\n",
72 avctx->compression_level);
73 avctx->compression_level = av_clip(avctx->compression_level, 0, 6);
82 avctx->compression_level = s->config.method;
90 s->config.method = avctx->compression_level;
97 av_log(avctx, AV_LOG_DEBUG, "%s - quality=%.1f method=%d\n",
99 avctx->compression_level);
104 static int libwebp_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
107 LibWebPContext *s = avctx->priv_data;
113 if (avctx->width > WEBP_MAX_DIMENSION || avctx->height > WEBP_MAX_DIMENSION) {
114 av_log(avctx, AV_LOG_ERROR, "Picture size is too large. Max is %dx%d.\n",
128 pic->width = avctx->width;
129 pic->height = avctx->height;
131 if (avctx->pix_fmt == AV_PIX_FMT_RGB32) {
136 av_log(avctx, AV_LOG_WARNING,
149 av_log(avctx, AV_LOG_WARNING,
173 if (avctx->pix_fmt == AV_PIX_FMT_YUVA420P) {
187 av_log(avctx, AV_LOG_WARNING,
202 av_log(avctx, AV_LOG_ERROR,
219 av_log(avctx, AV_LOG_ERROR, "WebPEncode() failed with error: %d\n",