Conversation
9512441 to
767774e
Compare
adding the capability to include an optional decoder parameters set for a specfic test vector in the test suite definition. optional parameters are utilized in Decoder class decode function abstraction and are applied in Gstreamer(Decoder) and Ffmpeg(Decoder) classes implementations. It's child class responsibility to handle the optional parameters.
| decoder_params = "" | ||
| if optional_params: | ||
| for key, value in optional_params.items(): | ||
| decoder_params += f" {key}={value} " |
There was a problem hiding this comment.
Optional parameter names and values can't be translated 1-to-1 to an implementation's property name and value.
If a test vector requires a parameter to be configured, there is no guarantee that the ffmpeg and gstreamer decoders for that codec will use the same property name. The mapping from the optional parameter key name to the property name must be done in the decoder's implementation.
Let's imagine there is a test vector for AV1 that requires enabling a feature named cool_feature. The test vector will define cool_feature = true. The ffmpeg av1 decoder will map this into enable_cool_feature = 1 and the GStreamer AV1 decoder will map this into cool_feature_enabled = True.
The mapping from optional_params into a decoder property must be done in the decoder implementation, not in a generic way in the base class.
adding the capability to include an optional decoder parameters set for a specfic test vector in the test suite definition. optional parameters are part of Decoder class decode function abstraction and are applied in Gstreamer(Decoder) and Ffmpeg(Decoder) classes implementations. It's child class responsibility to handle the optional parameters.