Skip to content

Instantly share code, notes, and snippets.

@hewumars
Last active November 30, 2019 01:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hewumars/aa93b707774ebb4b435d9e5f49edb009 to your computer and use it in GitHub Desktop.
Save hewumars/aa93b707774ebb4b435d9e5f49edb009 to your computer and use it in GitHub Desktop.
ImageData<uint8_t> resized_image;
int out_size = ALIGN_UP(input_tensor_dim_vec_[model_id].w, 128) * ALIGN_UP(input_tensor_dim_vec_[model_id].h, 16) * 3/2;
uint8_t * out_buffer = (uint8_t *)memalign(128, out_size);
if (out_buffer == NULL)
{
HIAI_ENGINE_LOG("Hfbc2Yuv call memalign failed");
return HIAI_ERROR;
}
resized_image.size = out_size;
resized_image.width = input_tensor_dim_vec_[model_id].w;
resized_image.height = input_tensor_dim_vec_[model_id].h;
resized_image.data.reset(out_buffer, std::default_delete<uint8_t []>());
./va_frame --gpu 1 --ods_addr 172.18.10.178 --ods_port 1161 --subcmu_dispatch_port 1156 --subcmu_report_port 1157 --plugin_code 0208000100 --max_task_num 128
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment