Browse Source

Modify waring information

tags/v1.1.0
shenwei41 5 years ago
parent
commit
f112413563
2 changed files with 4 additions and 4 deletions
  1. +2
    -2
      mindspore/ccsrc/minddata/dataset/kernels/image/lite_cv/image_process.cc
  2. +2
    -2
      mindspore/ccsrc/minddata/dataset/kernels/image/lite_cv/lite_mat.cc

+ 2
- 2
mindspore/ccsrc/minddata/dataset/kernels/image/lite_cv/image_process.cc View File

@@ -306,9 +306,9 @@ static bool ConvertYUV420SPToBGR(const uint8_t *data, LDataType data_type, bool
const uint8_t *y_ptr = data;
const uint8_t *uv_ptr = y_ptr + w * h;
uint8_t *bgr_ptr = mat;
int bgr_stride = 3 * w;
const int bgr_stride = 3 * w;

for (int y = 0; y < h; ++y) {
for (uint64_t y = 0; y < h; ++y) {
uint8_t *bgr_buf = bgr_ptr;
const uint8_t *uv_buf = uv_ptr;
const uint8_t *y_buf = y_ptr;


+ 2
- 2
mindspore/ccsrc/minddata/dataset/kernels/image/lite_cv/lite_mat.cc View File

@@ -15,7 +15,7 @@
*/
#include "minddata/dataset/kernels/image/lite_cv/lite_mat.h"

#include <limits.h>
#include <limits>
#include <algorithm>
#include <cmath>
#ifdef ENABLE_ANDROID
@@ -252,7 +252,7 @@ void LiteMat::Release() {

void *LiteMat::AlignMalloc(unsigned int size) {
unsigned int length = sizeof(void *) + ALIGN - 1;
if (size > INT_MAX - length) {
if (size > std::numeric_limits<uint32_t>::max() - length) {
return nullptr;
}
void *p_raw = reinterpret_cast<void *>(malloc(size + length));


Loading…
Cancel
Save