aboutsummaryrefslogtreecommitdiff
path: root/source/scale_argb.cc
diff options
context:
space:
mode:
authorFrank Barchard <fbarchard@google.com>2022-09-16 11:12:39 -0700
committerFrank Barchard <fbarchard@chromium.org>2022-09-16 19:46:47 +0000
commitf71c83552d373f0ff41833b17e2880632d8561d7 (patch)
tree09088188086a6b03d07a5ebaa8edf01658466ad8 /source/scale_argb.cc
parent3e38ce50589d9319badc0501f96d6c5b2b177472 (diff)
downloadlibyuv-f71c83552d373f0ff41833b17e2880632d8561d7.tar.gz
I420ToRGB24MatrixFilter function added
- Implemented as 3 steps: Upsample UV to 4:4:4, I444ToARGB, ARGBToRGB24 - Fix some build warnings for missing prototypes. Pixel 4 I420ToRGB24_Opt (743 ms) I420ToRGB24Filter_Opt (1331 ms) Windows with skylake xeon: x86 32 bit I420ToRGB24_Opt (387 ms) I420ToRGB24Filter_Opt (571 ms) x64 64 bit I420ToRGB24_Opt (384 ms) I420ToRGB24Filter_Opt (582 ms) Bug: libyuv:938, libyuv:830 Change-Id: Ie27f70816ec084437014f8a1c630ae011ee2348c Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/3900298 Reviewed-by: Wan-Teh Chang <wtc@google.com>
Diffstat (limited to 'source/scale_argb.cc')
-rw-r--r--source/scale_argb.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/source/scale_argb.cc b/source/scale_argb.cc
index 9c3acf7f..07840d65 100644
--- a/source/scale_argb.cc
+++ b/source/scale_argb.cc
@@ -155,8 +155,8 @@ static void ScaleARGBDown4Box(int src_width,
int dy) {
int j;
// Allocate 2 rows of ARGB.
- const int kRowSize = (dst_width * 2 * 4 + 31) & ~31;
- align_buffer_64(row, kRowSize * 2);
+ const int row_size = (dst_width * 2 * 4 + 31) & ~31;
+ align_buffer_64(row, row_size * 2);
int row_stride = src_stride * (dy >> 16);
void (*ScaleARGBRowDown2)(const uint8_t* src_argb, ptrdiff_t src_stride,
uint8_t* dst_argb, int dst_width) =
@@ -187,9 +187,9 @@ static void ScaleARGBDown4Box(int src_width,
for (j = 0; j < dst_height; ++j) {
ScaleARGBRowDown2(src_argb, src_stride, row, dst_width * 2);
- ScaleARGBRowDown2(src_argb + src_stride * 2, src_stride, row + kRowSize,
+ ScaleARGBRowDown2(src_argb + src_stride * 2, src_stride, row + row_size,
dst_width * 2);
- ScaleARGBRowDown2(row, kRowSize, dst_argb, dst_width);
+ ScaleARGBRowDown2(row, row_size, dst_argb, dst_width);
src_argb += row_stride;
dst_argb += dst_stride;
}
@@ -548,11 +548,11 @@ static void ScaleARGBBilinearUp(int src_width,
const uint8_t* src = src_argb + yi * (int64_t)src_stride;
// Allocate 2 rows of ARGB.
- const int kRowSize = (dst_width * 4 + 31) & ~31;
- align_buffer_64(row, kRowSize * 2);
+ const int row_size = (dst_width * 4 + 31) & ~31;
+ align_buffer_64(row, row_size * 2);
uint8_t* rowptr = row;
- int rowstride = kRowSize;
+ int rowstride = row_size;
int lasty = yi;
ScaleARGBFilterCols(rowptr, src, dst_width, x, dx);
@@ -798,14 +798,14 @@ static void ScaleYUVToARGBBilinearUp(int src_width,
const uint8_t* src_row_v = src_v + uv_yi * (int64_t)src_stride_v;
// Allocate 2 rows of ARGB.
- const int kRowSize = (dst_width * 4 + 31) & ~31;
- align_buffer_64(row, kRowSize * 2);
+ const int row_size = (dst_width * 4 + 31) & ~31;
+ align_buffer_64(row, row_size * 2);
// Allocate 1 row of ARGB for source conversion.
align_buffer_64(argb_row, src_width * 4);
uint8_t* rowptr = row;
- int rowstride = kRowSize;
+ int rowstride = row_size;
int lasty = yi;
// TODO(fbarchard): Convert first 2 rows of YUV to ARGB.