Hello, I am using code, based on https://github.com/FFmpeg/FFmpeg/blob/master/doc/examples/hw_decode.c, but I am not transferring the decoded data to the host, I keep it on the device for later use with cuda code (my goal will be to use RGB 8-12 bits per channel data).
I could not find a way to get the data format ((AVPixelFormat)frame->format translates to: "HW acceleration through CUDA. data[i] contain CUdeviceptr pointers exactly as for system memory frames.") I understand that I have two arrays: frame->data[0] and frame->data[1]. I would like to translate the data into a cuda native structure like: cudaPitchedPtr CUdeviceptr{}; CUdeviceptr.ptr = frame->data[0]; CUdeviceptr.ysize = frame->height; CUdeviceptr.xsize = frame->width; Which is probably wrong, since width==1920 height==1080 and should have colors or YUV data. How to get to know the data format (RGB, BGR, YUV, 8/10/12bits per channel etc) and the size of the array ? If it is not RGB8 (or 10-12), can I get that through some ffmpeg implementation, maybe with an nvdec based function ? What is the correct cuda-native data ? cudaPitchedPtr or something else ? frame->data[0] is uint8_t, but the array is probably something else in the general case; so what is it (as redundancy or extension of "what is the data format") ? Am I posting at the right place, or should I go on SO ? Many thanks + regards Soleil
_______________________________________________ Libav-user mailing list Libav-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/libav-user To unsubscribe, visit link above, or email libav-user-requ...@ffmpeg.org with subject "unsubscribe".