I have a query on the significance of OMX_IndexParamVideoAvc for an OMX video decoder. Specifically, my query is: Should an OMX Video Decoder support the index OMX_IndexParamVideoAvc as part of get and set functionalities?
Background:
From my understanding, this index is more useful from a video encoder perspective, as this is employed by an OMXIL Client to query the underlying component on the existing support and further configure the encoder as the client's needs.
From a specification perspective, I observe that the specification does indicate the support for index OMX_IndexParamVideoAvc on VPB+0 for a video decoder as in page 359 of the specification. In this section, only profile and level are populated.
Potentially I feel that this index could be employed for OMX_GetParameter to retrieve the max. profile and level supported by the component. However, the same could also be retrieved from OMX_IndexParamVideoProfileLevelQuerySupported.
Hence,my main doubts are:
Should an
OMX video decodersupport the indexOMX_IndexParamVideoAvc?If this index is supported, then what should be the default values when an
OMXILclient queries the same, say inLOADEDstate?The point where this index could logically be filled only after the component is in
EXECUTINGstate and the first buffer withOMX_BUFFERFLAG_CODECONFIGhas been decoded. Until this state is reached, should the decoder populate only max.profileandlevelfields and set other fields to zero?Is there a practical scenario where this index is queried from an
OMX video decoder? A quick search onandroidshows a predominant support for this index fromencoders. Even inAOSPsources, the support for this index fromExynosimplementations is forprofileandlevel. Hence, I am not particularly convinced of the intended use of this index forOMX video decoders.
Common Implementations:
When I tried to search for common implementations, I found some interesting data. TI and Broadcomm encoders support this index (in some cases partially) as shown in OMX_VENC and omx.broadcomm.video_encode. However, a similar search for decoders as in OMX_VDEC and omx.broadcommn.video_decode showed that there is no apparent support for this index in decoders. The only exception to this understanding is found in samsung's aries implementation as shown in decoder code here.
Any pointers/comments/suggestions would be highly helpful.Many thanks in advance.
I think that you are right it should be used for enc component setup.
OMX_IndexParamVideoProfileLevelQuerySupportedused like here along withOMX_IndexParamVideoProfileLevelCurrentcovers the case and purpose ofOMX_IndexParamVideoAvcis to get/set the rest ofOMX_VIDEO_PARAM_AVCTYPEI think that providing max supported values via
OMX_IndexParamVideoAvcmight be missleading.