Lines Matching refs:image
157 scoped_ptr<vpx_image_t> image(new vpx_image_t());
158 memset(image.get(), 0, sizeof(vpx_image_t));
161 image->d_w = size.width();
162 image->w = size.width();
163 image->d_h = size.height();
164 image->h = size.height();
169 image->fmt = VPX_IMG_FMT_I444;
170 image->x_chroma_shift = 0;
171 image->y_chroma_shift = 0;
173 image->fmt = VPX_IMG_FMT_YV12;
174 image->x_chroma_shift = 1;
175 image->y_chroma_shift = 1;
180 const int y_stride = ((image->w - 1) & ~15) + 16;
181 const int uv_unaligned_stride = y_stride >> image->x_chroma_shift;
184 // libvpx accesses the source image in macro blocks, and will over-read
185 // if the image is not padded out to the next macroblock: crbug.com/119633.
190 const int y_rows = ((image->h - 1) & ~(kMacroBlockSize-1)) + kMacroBlockSize;
191 const int uv_rows = y_rows >> image->y_chroma_shift;
197 // Reset image value to 128 so we just need to fill in the y plane.
203 image->planes[0] = uchar_buffer;
204 image->planes[1] = image->planes[0] + y_stride * y_rows;
205 image->planes[2] = image->planes[1] + uv_stride * uv_rows;
206 image->stride[0] = y_stride;
207 image->stride[1] = uv_stride;
208 image->stride[2] = uv_stride;
210 *out_image = image.Pass();
354 // (Re)Create the VPX image structure and pixel buffer.