FFmpeg: findTargetSWFormat - take codec into account


When creating an encoder, the Codec may support less formats than the
HWAccel supports via its constraints.

So we should as a first step intersect both lists before we score the
formats. For NVidia encoders this may still not be enough, as
avcodec_get_supported_config may still return formats that are not
supported for encoding. e.g. it may advertise yuv444p16le, but open
fails with "10 bit encode not supported".

Pick-to: 6.12
Change-Id: I6e2fc7211d430334b68c9bd289946701a464c314
Reviewed-by: Nils Petter Skålerud <nils.petter.skalerud@qt.io>
commitb8dfb5cdb84515bd7dff739eb2ced23f89ee2d64
parentbea70ce512f0093fac1181f95f8eddb8f0f427ba
authorTim Blechmann <tim.blechmann@qt.io>
committerTim Blechmann <tim.blechmann@qt.io>
commit timeWed, 12 Aug 2026 09:26:26 +0000