Lines Matching refs:height
46 const int height = picture->height;
51 const int uv_height = HALVE(height);
75 uv0_size = height * uv0_stride;
80 y_size = (uint64_t)y_stride * height;
82 a_size = (uint64_t)a_stride * height;
87 if (width <= 0 || height <= 0 || // luma/alpha param error
123 const uint64_t argb_size = (uint64_t)width * height;
124 if (width <= 0 || height <= 0) {
158 // Grab the 'specs' (writer, *opaque, width, height...) from 'src' and copy them
200 uint8_t* dst, int dst_stride, int width, int height) {
201 while (height-- > 0) {
223 int width, int height) {
226 if (width <= 0 || height <= 0) return 0;
228 if ((*top) + height > pic->height) return 0;
241 dst->y, dst->y_stride, dst->width, dst->height);
243 dst->u, dst->uv_stride, HALVE(dst->width), HALVE(dst->height));
245 dst->v, dst->uv_stride, HALVE(dst->width), HALVE(dst->height));
248 dst->a, dst->a_stride, dst->width, dst->height);
257 dst->u0, dst->uv0_stride, uv0_width, dst->height);
259 dst->v0, dst->uv0_stride, uv0_width, dst->height);
265 4 * dst->width, dst->height);
279 int left, int top, int width, int height,
284 if (!AdjustAndCheckRectangle(src, &left, &top, width, height)) return 0;
290 dst->height = height;
321 int left, int top, int width, int height) {
325 if (!AdjustAndCheckRectangle(pic, &left, &top, width, height)) return 0;
329 tmp.height = height;
336 tmp.y, tmp.y_stride, width, height);
338 tmp.u, tmp.uv_stride, HALVE(width), HALVE(height));
340 tmp.v, tmp.uv_stride, HALVE(width), HALVE(height));
345 tmp.a, tmp.a_stride, width, height);
356 tmp.u0, tmp.uv0_stride, w, height);
358 tmp.v0, tmp.uv0_stride, w, height);
366 width * 4, height);
398 int WebPPictureRescale(WebPPicture* pic, int width, int height) {
405 prev_height = pic->height;
406 // if width is unspecified, scale original proportionally to height ratio.
408 width = (prev_width * height + prev_height / 2) / prev_height;
410 // if height is unspecified, scale original proportionally to width ratio.
411 if (height == 0) {
412 height = (prev_height * width + prev_width / 2) / prev_width;
415 if (width <= 0 || height <= 0) return 0;
419 tmp.height = height;
430 tmp.y, width, height, tmp.y_stride, work, 1);
434 HALVE(width), HALVE(height), tmp.uv_stride, work, 1);
438 HALVE(width), HALVE(height), tmp.uv_stride, work, 1);
442 tmp.a, width, height, tmp.a_stride, work, 1);
449 tmp.u0, (width + s / 2) / s, height, tmp.uv0_stride, work, 1);
452 tmp.v0, (width + s / 2) / s, height, tmp.uv0_stride, work, 1);
464 (uint8_t*)tmp.argb, width, height,
519 static int CheckNonOpaque(const uint8_t* alpha, int width, int height,
522 while (height-- > 0) {
536 return CheckNonOpaque(picture->a, picture->width, picture->height,
542 for (y = 0; y < picture->height; ++y) {
584 const int uv_height = HALVE(picture->height);
601 const int height = picture->height;
602 const int has_alpha = CheckNonOpaque(a_ptr, width, height, step, rgb_stride);
612 for (y = 0; y < height; ++y) {
622 for (y = 0; y < (height >> 1); ++y) {
630 if (height & 1) {
642 for (y = 0; y < height; ++y) {
651 for (y = 0; y < height; ++y) {
664 for (y = 0; y < height; ++y) {
682 const int height = picture->height;
697 for (y = 0; y < height; ++y) {
711 for (y = 0; y < height; ++y) {
782 const int height = picture->height;
793 for (y = 1; y + 1 < height; y += 2) {
804 if (height > 1 && !(height & 1)) {
809 for (y = 0; y < height; ++y) {
887 h = pic->height / SIZE;
969 src->width != ref->width || src->height != ref->height ||
990 uv_h = HALVE(src->height);
994 ref->y, ref->y_stride, src->width, src->height);
1001 src->width, src->height)
1003 result[0] = GetPSNR(sse[0] / (src->width * src->height));
1006 result[3] = GetPSNR(sse[3] / (src->width * src->height));
1009 int total_pixels = src->width * src->height + 2 * uv_w * uv_h;
1011 total_pixels += src->width * src->height;
1020 src->width, src->height, &stats[0]);
1030 src->width, src->height, &stats[3]);
1053 static size_t Encode(const uint8_t* rgba, int width, int height, int stride,
1069 pic.height = height;