Lines Matching defs:img

13 static void yuvconfig2image(vpx_image_t *img, const YV12_BUFFER_CONFIG  *yv12,
24 img->fmt = VPX_IMG_FMT_I444;
27 img->fmt = VPX_IMG_FMT_I422;
31 img->fmt = VPX_IMG_FMT_I420;
34 img->bit_depth = 8;
35 img->w = yv12->y_stride;
36 img->h = ALIGN_POWER_OF_TWO(yv12->y_height + 2 * VP9_ENC_BORDER_IN_PIXELS, 3);
37 img->d_w = yv12->y_crop_width;
38 img->d_h = yv12->y_crop_height;
39 img->x_chroma_shift = ss_x;
40 img->y_chroma_shift = ss_y;
41 img->planes[VPX_PLANE_Y] = yv12->y_buffer;
42 img->planes[VPX_PLANE_U] = yv12->u_buffer;
43 img->planes[VPX_PLANE_V] = yv12->v_buffer;
44 img->planes[VPX_PLANE_ALPHA] = NULL;
45 img->stride[VPX_PLANE_Y] = yv12->y_stride;
46 img->stride[VPX_PLANE_U] = yv12->uv_stride;
47 img->stride[VPX_PLANE_V] = yv12->uv_stride;
48 img->stride[VPX_PLANE_ALPHA] = yv12->y_stride;
49 img->bps = bps;
50 img->user_priv = user_priv;
51 img->img_data = yv12->buffer_alloc;
52 img->img_data_owner = 0;
53 img->self_allocd = 0;
56 static vpx_codec_err_t image2yuvconfig(const vpx_image_t *img,
58 yv12->y_buffer = img->planes[VPX_PLANE_Y];
59 yv12->u_buffer = img->planes[VPX_PLANE_U];
60 yv12->v_buffer = img->planes[VPX_PLANE_V];
62 yv12->y_crop_width = img->d_w;
63 yv12->y_crop_height = img->d_h;
64 yv12->y_width = img->d_w;
65 yv12->y_height = img->d_h;
67 yv12->uv_width = img->x_chroma_shift == 1 ? (1 + yv12->y_width) / 2
69 yv12->uv_height = img->y_chroma_shift == 1 ? (1 + yv12->y_height) / 2
72 yv12->y_stride = img->stride[VPX_PLANE_Y];
73 yv12->uv_stride = img->stride[VPX_PLANE_U];
75 yv12->border = (img->stride[VPX_PLANE_Y] - img->w) / 2;