请观察如下伪代码,补全计算vdec+resize串联使用时,resize输入数据内存大小的计算公式(请填写变量名): uint32_t inputWidth = 1080; uint32_t inputHeight = 720; uint32_t sizeAlignment = 3; uint32_t sizeNum = 2; uint3_t aligned_w = 16; uint3_t aligned_h = 2; //the input yuv is from VDEC, it shoud be aligned to 16*2 uint32_t inputWidthStride = (inputWidth + aligned_w - 1) / aligned_w * aligned_w; uint32_t inputHeightStride = (inputHeight + aligned_h - 1) / aligned_h * aligned_h; uint32_t inputBufferSize = inputWidthStride * inputHeightStride * ()/();
时间: 2024-03-02 13:51:48 浏览: 153
resize数据文件大小
根据伪代码,计算vdec+resize串联使用时,resize输入数据内存大小的计算公式如下:
```
uint32_t inputWidth = 1080;
uint32_t inputHeight = 720;
uint32_t sizeAlignment = 3;
uint32_t sizeNum = 2;
uint3_t aligned_w = 16;
uint3_t aligned_h = 2;
// the input yuv is from VDEC, it should be aligned to 16*2
uint32_t inputWidthStride = (inputWidth + aligned_w - 1) / aligned_w * aligned_w;
uint32_t inputHeightStride = (inputHeight + aligned_h - 1) / aligned_h * aligned_h;
uint32_t inputBufferSize = inputWidthStride * inputHeightStride * sizeNum / sizeAlignment; // 填写计算公式
```
其中,inputWidth和inputHeight为输入图像的宽高,aligned_w和aligned_h为对齐宽高,sizeNum表示需要存储的图像数目,sizeAlignment表示对齐系数。inputWidthStride和inputHeightStride为宽度和高度的对齐值。输入数据内存大小的计算公式为:inputWidthStride * inputHeightStride * sizeNum / sizeAlignment。
阅读全文