void RunAccuracyCheck() {
const int width = 1920;
const int height = 1080;
- int i = 0;
+ size_t i = 0;
const uint8_t kPixFiller = 128;
YV12_BUFFER_CONFIG lbd_src, lbd_dst;
YV12_BUFFER_CONFIG hbd_src, hbd_dst;
memset(ybf->buffer_alloc, 0, (int)frame_size);
#endif
#endif
- } else if (frame_size > (size_t)ybf->buffer_alloc_sz) {
+ } else if (frame_size > ybf->buffer_alloc_sz) {
// Allocation to hold larger frame, or first allocation.
vpx_free(ybf->buffer_alloc);
ybf->buffer_alloc = NULL;
if (frame_size != (size_t)frame_size) return -1;
+ // TODO(yunqingwang): On 32 bit systems, the maximum resolution supported
+ // in the encoder is 4k(3840x2160). The malloc() would fail if encoding
+ // >4k video on a 32 bit system. Later, maybe disable usage of up-sampled
+ // references to allow >4k video encoding on 32 bit platforms.
ybf->buffer_alloc = (uint8_t *)vpx_memalign(32, (size_t)frame_size);
if (!ybf->buffer_alloc) return -1;
- ybf->buffer_alloc_sz = (int)frame_size;
+ ybf->buffer_alloc_sz = (size_t)frame_size;
// This memset is needed for fixing valgrind error from C loop filter
// due to access uninitialized memory in frame border. It could be
ybf->uv_stride = uv_stride;
ybf->border = border;
- ybf->frame_size = (int)frame_size;
+ ybf->frame_size = (size_t)frame_size;
ybf->subsampling_x = ss_x;
ybf->subsampling_y = ss_y;