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 - Dropped commands #3860

Closed
zsmatyas opened this issue Feb 16, 2018 · 0 comments
Closed

CEA608 - Dropped commands #3860

zsmatyas opened this issue Feb 16, 2018 · 0 comments
Assignees
Labels

Comments

@zsmatyas
Copy link
Contributor

zsmatyas commented Feb 16, 2018

Starting at this line the code checks if a CEA608 control code was repeated:

The problem is that it does not take into account the timing of the received control codes. There are contents that use the same control code multiple times consecutively, like the Sarnoff test streams required for FCC certification. Their content contains the following commands:

02-15 10:32:03.888 MISC: RESUME_CAPTION_LOADING
02-15 10:32:03.938 MISC: ERASE_DISPLAYED_MEMORY
02-15 10:32:03.978 MISC: ERASE_NON_DISPLAYED_MEMORY
02-15 10:32:04.008 PAC: Row:11; Col:1; Color:WHITE; italic:false; underline:false
02-15 10:32:04.568 PAC: Row:12; Col:1; Color:WHITE; italic:false; underline:false
02-15 10:32:05.529 MISC: END_OF_CAPTION
02-15 10:32:05.869 MISC: END_OF_CAPTION // Dropped
02-15 10:32:06.210 MISC: END_OF_CAPTION
02-15 10:32:06.540 MISC: END_OF_CAPTION // Dropped
02-15 10:32:06.870 MISC: END_OF_CAPTION 
...

Note: According to the standard END_OF_CAPTION flips the visible and hidden caption buffers, so it should make the 2 lines repeatedly visible then hidden again: effectively blinking in this case.

The current implementation drops every second command of this content.

According to https://www.law.cornell.edu/cfr/text/47/79.101

If the first transmission of a control code pair passes parity, it is acted upon within one video frame. If the next frame contains a perfect repeat of the same pair, the redundant code is ignored.

So the check should only drop control codes if they are in consecutive video frames immediately after each other.

@erdemguven erdemguven self-assigned this Feb 26, 2018
@erdemguven erdemguven added the bug label Feb 26, 2018
@erdemguven erdemguven assigned ojw28 and unassigned erdemguven Feb 26, 2018
zsmatyas added a commit to zsmatyas/ExoPlayer that referenced this issue Jan 10, 2019
Reported in google#3860
For failing examples see the github link above.

[Problem]
We drop matching control codes even if they are not received on
consecutive frames.

The specification says
"(4) If the first transmission of a control code pair passes parity,
it is acted upon within one video frame. If the NEXT frame contains
a perfect repeat of the same pair, the redundant code is ignored."

Keyword is the NEXT. The frames must arrive immediately after
each other.

See https://www.law.cornell.edu/cfr/text/47/79.101

[Solution]
Set an additional flag when any data is processed. Control code
duplication checks should be limited only for the first control
byte pairs processed after any control code.

[Test]
Sarnoff tests have equivalent CEA708 and CEA608 Streams.
@ojw28 ojw28 closed this as completed Jan 15, 2019
@google google locked and limited conversation to collaborators May 16, 2019
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

3 participants