This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

contradictions in decoder/encoder parameters

Guru 20755 points

Hello,

I would like to ask How the H.264 codec encoder/decoder handles contradictions between given profile/level and the resolution & fps (for example using level 5 with fps and resolution that should be used with level 2) . I also see a set of in-compliant parameter errors, but still the question is if it use ? is it used for all types of errors ? Does the encoder/decoder stops coding when an error occurred ? To summarize:

1. How does the encoder act with each contradiction ?
2. How does the decoder act with each contradiction ?
3. what does in mean when appears in user's guide "It is not guaranteed to achieve real time performance for ...". Does it mean that the codec delay is expected to be long delay ? 

Thanks,

Ran

  • Ran,

    The behavior will vary from implementation to implementation. Which device is this for ?

    Mostly, if the level/Profile is higher than the i/p parameter value (like fps, size etc), the encoder will not crib. If the level/profile is lower, then it may either throw error during create time or will internally change to higher level.

    Decoders on the other hand mostly ignores the level and profile information and relies on other parameters for decoding.

    Pls send the device to get more accurate answer.

    regards

    Yashwant

  • Hi Yashwant,

    My platform: device: DM8168, codec: H.264 encoder/decoder

    >Mostly, if the level/Profile is higher than the i/p parameter value (like fps, size etc), the encoder will not crib.
    What does it mean that the encoder will not crib, does it mean that it will anyway try to encode with the parameters (not guaranteeing real-time performance) ?
    Is there a detailed list in the documentation for the limits of fps and size for each level& profile ? What happens when fps or size is out of profile/level ? 
    Does the encoder returns in compliance error which size of fps is out of range, but keep trying to encode ?

    >If the level/profile is lower, then it may either throw error during create time or will internally change to higher level.
    When each of the above scenario happens ? Is it described in user's guide ? when the encoder throws error, does it mean it is fatal error, and no encoding is done ?

     >Decoders on the other hand mostly ignores the level and profile information and relies on other parameters for decoding.

    In DM8168 plaform, Does the decoder always ignore the level and profile ?

    I thank you for any more accurate information, or reference to datasheet user's guide for the information,

    Thanks,

    Ran

  • Hello Ran,

    For detailed list of limit on parameter , with respect to Level & Profile, please refer H264 standard. This detail is not available in user guide or data sheet/release notes..Since it is standard specific things so please refer H264 standard.

    Regarding encoder behavior

    Whenever a parameter is outside the limit defined in standard as per level and profile , then in that case encoding will happen with same value ( outside limit). Also in any such scenario of codec creation or control call encoder will throw non fatal warning saying that you have provide level/profile incomplaint parameter.

    Strictly speaking bit stream generated in that scenario will not be perfectly standard complaint.. But most of the encoder will be able to decode that. 

    Regards

    Deepak Poddar

  • Hi Deepack,

    Thank you very much,

    One more thing on this issue, if I may.:

     Is it true to say that H.264, MPEG-4 decoder codec do support the full features of each profile/level according to standard ?

    Thanks,

    Ran

  • H.264 decoder - Supports all profile except for FMO and ASO of BP. It supports upto level 5.1 (max resolution as 4k x 2k)

    Mpeg4 decoder -  SP and ASP upto level 6. GMC for ASP is not supported.

    regards

    Yashwant

  • Hi Deepack, Yashwant,

    I would like to verify please that with MPEG-4, H.264, encoder on DM8168 platform, the behavior is that if parameters are out of limit the encoder continues, and there is no internally change of level or profile in case that other parameters (resolution,level) do not fit, for example if we use codec in low level, with resolution of high level there is no internal change of level in stream as high.

    Are there any cases in which the encoder change internally its level, profile ?

    Thank you,

    Ran 

  • Ran, 

    H264 Encoder :

    Encoder will not change level or profile in any case. If the parameters are in-compliant with this setting of level/profile, the encoder will raise the warning and proceed with the encoding. The warning is thrown at create time/ control SET_PARAMS time. And if user is okay with this warning, then he can allow encoder to continue encoding. (Also refer to Deepak's reply dated OCT-29 2012)

    MPEG-4 Encoder :

    I am not much in-touch with this codec, may be experts can answer here.

    Thank you.

  • Dear Ran,

    As in H.264, MPEG4 encoder also doesn't change the level internally. However MPEG4 encoder will throw out a non-fatal error in such scenario and if user is fine with this error then he can go ahead make a process call for encoding. Basically, same behavior as in H.264 encoder.

    Thanks & Regards