Lines Matching refs:img

112 static int set_pix_fmt(AVCodecContext *avctx, struct vpx_image *img,
123 avctx->color_range = color_ranges[img->range];
125 avctx->colorspace = colorspaces[img->cs];
126 if (avctx->codec_id == AV_CODEC_ID_VP8 && img->fmt != VPX_IMG_FMT_I420)
128 switch (img->fmt) {
151 if (img->bit_depth == 10) {
154 } else if (img->bit_depth == 12) {
162 if (img->bit_depth == 10) {
165 } else if (img->bit_depth == 12) {
173 if (img->bit_depth == 10) {
176 } else if (img->bit_depth == 12) {
184 if (img->bit_depth == 10) {
188 } else if (img->bit_depth == 12) {
224 struct vpx_image *img, *img_alpha;
264 if ((img = vpx_codec_get_frame(&ctx->decoder, &iter)) &&
270 if (img->d_w > img->w || img->d_h > img->h) {
272 img->d_w, img->d_h, img->w, img->h);
276 if ((ret = set_pix_fmt(avctx, img, ctx->has_alpha_channel)) < 0) {
278 img->fmt, img->bit_depth);
282 if ((int) img->d_w != avctx->width || (int) img->d_h != avctx->height) {
284 avctx->width, avctx->height, img->d_w, img->d_h);
285 ret = ff_set_dimensions(avctx, img->d_w, img->d_h);
291 (img->d_w != img_alpha->d_w ||
292 img->d_h != img_alpha->d_h ||
293 img->bit_depth != img_alpha->bit_depth)) {
296 img->d_w, img->d_h, img->bit_depth,
301 planes[0] = img->planes[VPX_PLANE_Y];
302 planes[1] = img->planes[VPX_PLANE_U];
303 planes[2] = img->planes[VPX_PLANE_V];
306 linesizes[0] = img->stride[VPX_PLANE_Y];
307 linesizes[1] = img->stride[VPX_PLANE_U];
308 linesizes[2] = img->stride[VPX_PLANE_V];
312 if (img->fb_priv && (!ctx->has_alpha_channel || img_alpha->fb_priv)) {
316 picture->buf[0] = av_buffer_ref(img->fb_priv);
334 linesizes, avctx->pix_fmt, img->d_w, img->d_h);