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

CEA608 Captions - Row count is not updated in CueBuilder inner class #3513

Closed
zsmatyas opened this issue Nov 29, 2017 · 4 comments
Closed

CEA608 Captions - Row count is not updated in CueBuilder inner class #3513

zsmatyas opened this issue Nov 29, 2017 · 4 comments
Assignees
Labels

Comments

@zsmatyas
Copy link
Contributor

The line defines captionRowCount:

The inner class CueBuilder has the same member defined on line 594.

The problem is, that the value of the inner class is only updated in ResetCueBuilders(), so this order of incoming commands and characters are processed incorrectly:

11-27 17:30:01.000 D/Cea608Decoder: MISC: ROLL_UP_CAPTIONS_2_ROWS
11-27 17:30:01.063 D/Cea608Decoder: MISC: CARRIAGE_RETURN
11-27 17:30:01.136 D/Cea608Decoder: PAC: Row:15; Col:1; Color:WHITE; italic:false; underline:false
11-27 17:30:01.166 D/Cea608Decoder: Incoming char: I
11-27 17:30:01.302 D/Cea608Decoder: Incoming char:
11-27 17:30:01.331 D/Cea608Decoder: Incoming char: A
11-27 17:30:01.332 D/Cea608Decoder: Incoming char: L
11-27 17:30:01.360 D/Cea608Decoder: Incoming char: W
11-27 17:30:01.360 D/Cea608Decoder: Incoming char: A
11-27 17:30:01.400 D/Cea608Decoder: Incoming char: Y
11-27 17:30:01.400 D/Cea608Decoder: Incoming char: S
11-27 17:30:01.435 D/Cea608Decoder: Incoming char:
11-27 17:30:01.465 D/Cea608Decoder: Incoming char: F
11-27 17:30:01.465 D/Cea608Decoder: Incoming char: O
11-27 17:30:01.495 D/Cea608Decoder: Incoming char: R
11-27 17:30:01.495 D/Cea608Decoder: Incoming char: G
11-27 17:30:01.535 D/Cea608Decoder: Incoming char: E
11-27 17:30:01.536 D/Cea608Decoder: Incoming char: T
11-27 17:30:01.567 D/Cea608Decoder: Incoming char: .
11-27 17:30:02.165 D/Cea608Decoder: MISC: ROLL_UP_CAPTIONS_3_ROWS
11-27 17:30:02.206 D/Cea608Decoder: MISC: CARRIAGE_RETURN
11-27 17:30:02.240 D/Cea608Decoder: PAC: Row:15; Col:1; Color:WHITE; italic:false; underline:false
11-27 17:30:02.308 D/Cea608Decoder: Incoming char: W
11-27 17:30:02.308 D/Cea608Decoder: Incoming char: H
11-27 17:30:02.340 D/Cea608Decoder: Incoming char: A
11-27 17:30:02.340 D/Cea608Decoder: Incoming char: T
11-27 17:30:02.544 D/Cea608Decoder: Incoming char:
11-27 17:30:02.574 D/Cea608Decoder: Incoming char: H
11-27 17:30:02.574 D/Cea608Decoder: Incoming char: A
11-27 17:30:02.604 D/Cea608Decoder: Incoming char: V
11-27 17:30:02.604 D/Cea608Decoder: Incoming char: E
11-27 17:30:02.635 D/Cea608Decoder: Incoming char:
11-27 17:30:02.667 D/Cea608Decoder: Incoming char: I
11-27 17:30:02.766 D/Cea608Decoder: Incoming char:
11-27 17:30:02.766 D/Cea608Decoder: Incoming char: J
11-27 17:30:02.807 D/Cea608Decoder: Incoming char: U
11-27 17:30:02.808 D/Cea608Decoder: Incoming char: S
11-27 17:30:02.841 D/Cea608Decoder: Incoming char: T
11-27 17:30:02.868 D/Cea608Decoder: Incoming char:
11-27 17:30:02.868 D/Cea608Decoder: Incoming char: B
11-27 17:30:02.899 D/Cea608Decoder: Incoming char: I
11-27 17:30:02.900 D/Cea608Decoder: Incoming char: N
11-27 17:30:02.938 D/Cea608Decoder: Incoming char: G
11-27 17:30:02.939 D/Cea608Decoder: Incoming char: E
11-27 17:30:04.541 D/Cea608Decoder: Incoming char:
11-27 17:30:04.541 D/Cea608Decoder: Incoming char: W
11-27 17:30:04.569 D/Cea608Decoder: Incoming char: A
11-27 17:30:04.569 D/Cea608Decoder: Incoming char: T
11-27 17:30:04.602 D/Cea608Decoder: Incoming char: C
11-27 17:30:04.935 D/Cea608Decoder: Incoming char: H
11-27 17:30:05.039 D/Cea608Decoder: Incoming char: ?

The value of captionRowCount in the inner class is not updated to 3, rendering is kept using the value 2 until the next resetCueBuilders() call. Note: if I seek back to this position in the content the captionRowCount is kept on the value last set by resetCueBuilders() so any number of rows can be shown depending on the position the seek is originating from.

@zsmatyas zsmatyas changed the title CEA608 Captions - Row count are not updated in CueBuilder inner class CEA608 Captions - Row count is not updated in CueBuilder inner class Nov 29, 2017
@ojw28 ojw28 added the bug label Nov 30, 2017
@ojw28
Copy link
Contributor

ojw28 commented Nov 30, 2017

Am I right in thinking ROLL_UP_CAPTIONS_3_ROWS should not clear the caption. So at the end you'd expect all three rows to be visible?

@ojw28
Copy link
Contributor

ojw28 commented Nov 30, 2017

As an additional question, if you're currently displaying three rows and get ROLL_UP_CAPTIONS_2_ROWS, would you expect that to immediately discard a row?

@zsmatyas
Copy link
Contributor Author

Annex B.8.1 of the 608 Standard about ROLL-UP style:

Precede each new row of text with these three codes:

  • RU2 or RU3 or RU4 (to set roll-up style and depth)
  • CR (to roll the display up one row)
  • PAC (to set the indent and base row)

Where

  • RU2-3-4 is ROLL_UP_CAPTIONS_2-3-4_ROWS (3 different commands)
  • CR is CARRIAGE_RETURN
  • PAC is Preamble Address Code

So I think there is no need to delete any lines. The RU2-3-4 commands set up how many lines are rolling and the following carriage return will remove the appropriate ones. If the amount of lines are increased, the next CR will not remove any lines. If the amount of lines are decreased, the CR command will remove more than 1 line, so we should be good either case.


Annex C.10

The three roll-up commands -- RU2, RU3, and RU4 -- select roll-up style and move the cursor to column 1. The FCC requires further that, if pop-on or paint-on captioning is already present in either memory, it shall be erased. This required erasure seems reasonable, since display memory may have to be reorganized in order to prepare for roll-up style.

This aligns whit the expectation, does not mention erasing any lines when ROLL-UP style was used previously.

ojw28 added a commit that referenced this issue Dec 4, 2017
Issue: #3513

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=177804505
@ojw28
Copy link
Contributor

ojw28 commented Dec 4, 2017

We've merged a fix into dev-v2, but don't have a particularly great way to test it. Please verify if possible.

@ojw28 ojw28 closed this as completed Dec 4, 2017
ojw28 added a commit that referenced this issue Dec 12, 2017
Issue: #3513

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=177804505
@google google locked and limited conversation to collaborators Apr 10, 2018
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