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>