Hi Nvidia,
I encountered an encoding issue. I needed to encode an image of size 1920×1056, but I didn’t realize that the stride was 2048. I directly called cudaMemcpy to copy the image data into the NV buffer.
Now I have a batch of encoded video data. My question to NVIDIA experts is: Is there any way to recover the original images from the encoded video data?
The stride of the data decoded using the NVIDIA GPU is 2048. I tried copying all the data directly to the CPU via cudaMemcpy , and found that the restored image has horizontal stripes.
Hi,
When the width is less than the pitch, will the pixels in the (pitch − width) region be encoded correctly? Because those pixels have been overwritten by me with normal pixels.
Hi,
The region between (pitch - width) is invalid. It is for alignment and you should not put valid data into the region.
Take 1920x1080 Y plane as an example. It is aligned to pitch = 2048 bytes. So you copy 1920 bytes, skip (2048 - 1920) bytes, copy next 1920 bytes, skip (2048 - 1920) bytes, copy next 1920 bytes, …