Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cea708Decoder : use good value for first range of c2 command #2595

Closed
khabedi opened this issue Mar 23, 2017 · 0 comments
Closed

Cea708Decoder : use good value for first range of c2 command #2595

khabedi opened this issue Mar 23, 2017 · 0 comments
Labels

Comments

@khabedi
Copy link

khabedi commented Mar 23, 2017

Hello,

We noticed a slight issue in Cea708 decoding , probably a typo/copy paste issue.
In Cea708Decoder.java :

 private void handleC2Command(int command) {
    // C2 Table doesn't contain any commands in CEA-708-B, but we do need to skip bytes
    if (command <= **0x0F**) {
      // Do nothing.
    } else if (command <= 0x0F) {
      serviceBlockPacket.skipBits(8);
    } else if (command <= 0x17) {
      serviceBlockPacket.skipBits(16);
    } else if (command <= 0x1F) {
      serviceBlockPacket.skipBits(24);
    }
  }

First check/skip should be with 0x07 instead of 0x0F.

As it is described in C2 Table contains no commands as of CEA-708 revision A:
if a command is seen in these code sets a decoder must skip an appropriate number of the following bytes.
0x00-0x07 +0 bytes
0x08-0x0f +1 byte
0x10-0x17 +2 bytes
0x18-0x1f +3 bytes

Could you have a look and do the appropriate update ?

Regards

@ojw28 ojw28 added the bug label Mar 23, 2017
ojw28 added a commit that referenced this issue Mar 23, 2017
@ojw28 ojw28 closed this as completed Mar 23, 2017
ojw28 added a commit that referenced this issue Mar 23, 2017
Issue: #2595

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=151004198
@google google locked and limited conversation to collaborators Aug 3, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants