Skip to content

decode_rs_char() should return int #13

Open

Description

@zhangboyang

According to documention of libfec:

The decode_ functions correct the errors in a Reed-Solomon codeword of N symbols up to the capability of the code. An optional list of "erased" symbol indices may be given in the eras_pos array to assist the decoder; this parameter may be NULL if no erasures are given. The number of erased symbols must be given in the no_eras parameter.

The decoder corrects the symbols "in place", returning the number of symbols in error. If the codeword is uncorrectable, -1 is returned and the data block is unchanged. If eras_pos is non-null, it is used to return a list of corrected symbol positions, in no particular order. This means that the array passed through this parameter must have at least nroots elements to prevent a possible buffer overflow.

The decode_ functions return a count of corrected
symbols, or -1 if the block was uncorrectible.

However, in the compatibility layer, decode_rs_char() returns void, and there is no return value in erasure_locations.

Activity

  1. changed the title [-]decode_rs_char should return int[/-] [+]decode_rs_char() should return int[/+] on Nov 18, 2017
  2. brian-armstrong commented on Jan 5, 2018

    @brian-armstrong
    Member

    Thanks for the report. The shim is built for compatibility with https://github.com/jgaeddert/liquid-dsp so it doesn't do everything exactly right. I've avoided taking bits from libfec's source so that this project could operate cleanly from an IP perspective. Now that you've reported this, I'll look into fixing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions