diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2024-04-24 21:38:04 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2024-04-24 21:38:04 +0000 |
commit | 9eabdb8b54403976be2fb9a7ac3e2a5a4b4f866d (patch) | |
tree | 7aa355fd0b89ec0b2611e17ee84a14c6fa449e22 /source/planar_functions.cc | |
parent | 1b581527656b7bb33d95a3f2d44ac98414139bd3 (diff) | |
parent | 1b119aa910ccec6f250604092093cc26423fe5d4 (diff) | |
download | libyuv-9eabdb8b54403976be2fb9a7ac3e2a5a4b4f866d.tar.gz |
Merge "Snap for 11760101 from 488a2af021e3e7473f083a9435b1472c0d411f3d to androidx-window-release" into androidx-window-releaseandroidx-window-release
Diffstat (limited to 'source/planar_functions.cc')
-rw-r--r-- | source/planar_functions.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/planar_functions.cc b/source/planar_functions.cc index f6ec0dac..1c94e260 100644 --- a/source/planar_functions.cc +++ b/source/planar_functions.cc @@ -3027,6 +3027,8 @@ int I420Blend(const uint8_t* src_y0, // Row buffer for intermediate alpha pixels. align_buffer_64(halfalpha, halfwidth); + if (!halfalpha) + return 1; for (y = 0; y < height; y += 2) { // last row of odd height image use 1 row of alpha instead of 2. if (y == (height - 1)) { @@ -4710,6 +4712,8 @@ int GaussPlane_F32(const float* src, { // 2 pixels on each side, but aligned out to 16 bytes. align_buffer_64(rowbuf, (4 + width + 4) * 4); + if (!rowbuf) + return 1; memset(rowbuf, 0, 16); memset(rowbuf + (4 + width) * 4, 0, 16); float* row = (float*)(rowbuf + 16); @@ -4868,6 +4872,8 @@ static int ARGBSobelize(const uint8_t* src_argb, uint8_t* row_y0 = row_y + kEdge; uint8_t* row_y1 = row_y0 + row_size; uint8_t* row_y2 = row_y1 + row_size; + if (!rows) + return 1; ARGBToYJRow(src_argb, row_y0, width); row_y0[-1] = row_y0[0]; memset(row_y0 + width, row_y0[width - 1], 16); // Extrude 16 for valgrind. @@ -5654,6 +5660,8 @@ int UYVYToNV12(const uint8_t* src_uyvy, int awidth = halfwidth * 2; // row of y and 2 rows of uv align_buffer_64(rows, awidth * 3); + if (!rows) + return 1; for (y = 0; y < height - 1; y += 2) { // Split Y from UV. |