• Martin Storsjö's avatar
    omxil: Set an AMR band mode based on the AMR variant · 010dc8cd
    Martin Storsjö authored
    This requires passing the original VLC codec id to the function,
    since both variants are mapped to OMX_AUDIO_CodingAMR.
    
    We don't set the actual correct band mode (since we don't know
    what bitrate mode is used for each frame, since it can vary), but
    we set mode 0. We could in principle set it more accurately based
    on bitrate, but since it can vary from frame to frame, this should
    be enough anyway.
    
    This is required for OMX.SEC.amr.dec, which is one single codec
    supporting both AMR variant roles, and this seems to be the way of
    signalling what AMR variant it is. If setting
    OMX_AUDIO_AMRBandModeUnused, the codec fails to initialize.
    
    A codec can get this info either by having two separate OMX codecs,
    such as OMX.google.amrnb.decoder vs OMX.google.amrwb.decoder, by
    checking what the caller set via OMX_IndexParamStandardComponentRole
    or via the band mode parameter - the samsung decoder seems to use
    the band mode.
    Signed-off-by: default avatarMartin Storsjö <martin@martin.st>
    010dc8cd
omxil.c 67.4 KB