On 01.08.2024 15:54, Roman Arzumanyan wrote:
Hello world,
This patch adds a pixel format guess based on probed bit depth.
With current FFMpeg ToT, when the cuvid codec is opened, input sw_pix_fmt
is AV_PIX_FMT_NV12 until the first frame is decoded. Even if input has 10
or 12 bit depth, the format will be NV12 for some time.
What's the need for this patch ?
Applications that rely on libavcodec will have a chance to calculate the
proper amount of vRAM required to store a reconstructed video frame before
decoding begins.
The 12 bit format should be AV_PIX_FMT_P016.
Also, might as well take probe_desc->log2_chroma_w/log2_chroma_h into
account.
If they're 0, it's 444, and the formats change to AV_PIX_FMT_YUV444P(16).
Akin to the switch() on format->bit_depth_luma_minus8 in the probe function.
Patch looks fine on first glance, though relying on a rather arbitrary
second field there does not seem like a good idea to me.
Why can't the application simply also look at the probed format?
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".