ittiam-systems / libmpegh

MPEG-H 3D Audio Low Complexity Profile Decoder. Encoder: https://github.com/ittiam-systems/libmpeghe
http://www.ittiam.com/
BSD 3-Clause Clear License
87 stars 20 forks source link

Failing to decode bytes when cicp index is specified by user for some mhas conformace streams #34

Closed amiartus closed 1 year ago

amiartus commented 1 year ago

Hello,

I have found a following behavior of the decoder:

  1. set str_dec_api.input_config.ui_cicp_layout_idx to a value other than the default(0), for example 1 or 2
  2. try to decode 'C104_3_FD.mhas' from the conformance streams
  3. ia_mpegh_dec_execute will not return error, but:

pstr_out_cfg->i_bytes_consumed > 0 pstr_out_cfg->num_out_bytes == 0

Expected:

User can select cicp index to use for decoding and decoder will provide output bytes > 0, or if not possible ia_mpegh_dec_init + ia_mpegh_dec_execute should fail if selected cicp index is not valid.

Selecting cicp index manually works for other conformance streams and MHA mp4 files, for example: when decoding 'H8_3_FD.mhas' I can select any cicp value and decoder will set proper num_out_bytes. Or I can set the default cicp value and decoder will detect the cicp layout from the file.

I guess I have also follow up question:

  1. is user allowed to set any cicp index?
  2. if the user provided index does not match the file or stream - is the decoder expected to mux the channels to fit into selected cicp index?

Could you please clarify?

Best Regards, Adam

SakethSathuvalli commented 1 year ago

Hi @miartad,

We will try this and get back to you at the earliest!

SakethSathuvalli commented 1 year ago

Hi @miartad ,

The stream "C104_3_FD.mhas" is a special stream with speaker layout index value set to "0" in the bit stream. The value 0 for this field refers to "any speaker set up". Since the source speaker set up is not clear, its not possible to initialize a rendering algorithm for any CICP option. We have corrected the error propogation path in #41.

Also we have tested CICP option for other streams where speaker layout set index value in the bit-stream is not "0" and the option works fine for those cases.

Thanks!

SakethSathuvalli commented 1 year ago

Hello @miartad,

I was wondering if you got a chance to validate the fix pushed for this issue.

Thanks!

amiartus commented 1 year ago

hi @SakethSathuvalli

I tried to decode the file.

when ui_cicp_layout_idx in input config is set to 0 the file will decode.

if I try to set a ui_cicp_layout_idx to value other than 0 for this kind of file the error during decoder init is propagated correctly.

thanks!