Skip to content

Conversation

@moveman
Copy link

@moveman moveman commented Jun 13, 2025

In raising this pull request, I confirm the following (please check boxes):

  • I have read and understood the contributors guide.
  • I have checked that another pull request for this purpose does not exist.
  • I have considered, and confirmed that this submission will be valuable to others.
  • I accept that this submission may not be used, and the pull request closed at the will of the maintainer.
  • I give this submission freely, and claim no ownership to its content.
  • I have mentioned this change in the changelog.

My familiarity with the project is as follows (check one):

  • I have never used CCExtractor.
  • I have used CCExtractor just a couple of times.
  • I absolutely love CCExtractor, but have not contributed previously.
  • I am an active contributor to CCExtractor.

We found ccextractor cannot handle row_count decreasing well. When row count decreases, the upper row should be displaced while the bottom row should be kept.
Before the fix, the srt is like this:

104
00:04:05,795 --> 00:04:06,295
{\an4}A roll-up caption's depth

105
00:04:07,296 --> 00:04:07,330
{\an4}A roll-up caption's depth

106
00:04:08,264 --> 00:04:08,297
{\an4}A roll-up caption's depth

107%  |  04:11
00:04:08,298 --> 00:04:12,034
{\an2}A roll-up caption's depth
displayed, like this.

108%  |  04:14
00:04:12,068 --> 00:04:14,770
{\an5}(CC1) Demonstration of
paint-on style captions:

After the fix, the srt is like this:

104
00:04:05,795 --> 00:04:06,295
{\an4}A roll-up caption's depth

105
00:04:07,296 --> 00:04:07,330
{\an4}A roll-up caption's depth
can be decreased after

106
00:04:08,264 --> 00:04:08,297
{\an2}can be decreased after
the caption has been

107%  |  04:11
00:04:08,298 --> 00:04:12,034
{\an2}the caption has been
displayed, like this.

108%  |  04:14
00:04:12,068 --> 00:04:14,770
{\an5}(CC1) Demonstration of
paint-on style captions:

The cea708 log of the original ccExtractor is included here:
708.log

The cea708 log of the fixed ccExtractor is included here:
new_708.log

Expected captions:
image
image

@cfsmp3
Copy link
Contributor

cfsmp3 commented Jun 13, 2025

LGTM, but be aware that since we are migrating to Rust it's possible this change gets lost if not ported.

@steel-bucket
Copy link
Contributor

Hi, can you please rebase so we could check the regression tests.
Thanks

Comment on lines +1049 to +1060
if (window->is_defined)
{
if (row_count < window->row_count)
{
// Remove the oldest row if the row count is reduced
for (int i = row_count; i < window->row_count; i++)
{
dtvcc_window_rollup(decoder, window);
}
}
}

Copy link
Member

@prateekmedia prateekmedia Aug 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be possible for you to change it to single if instead like:

if (window->is_defined && row_count <...) {
    for (...
}

Copy link
Member

@prateekmedia prateekmedia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! If you can resolve comment then fine, otherwise we can merge as is.

@ccextractor-bot
Copy link
Collaborator

CCExtractor CI platform finished running the test files on linux. Below is a summary of the test results, when compared to test for commit 60ae6fb...:
Report Name Tests Passed
Broken 13/13
CEA-708 14/14
DVB 7/7
DVD 3/3
DVR-MS 2/2
General 27/27
Hardsubx 0/1
Hauppage 3/3
MP4 3/3
NoCC 10/10
Options 86/86
Teletext 21/21
WTV 13/13
XDS 34/34

Your PR breaks these cases:


It seems that not all tests were passed completely. This is an indication that the output of some files is not as expected (but might be according to you).

Check the result page for more info.

@ccextractor-bot
Copy link
Collaborator

CCExtractor CI platform finished running the test files on windows. Below is a summary of the test results, when compared to test for commit da03c1e...:
Report Name Tests Passed
Broken 13/13
CEA-708 14/14
DVB 4/7
DVD 3/3
DVR-MS 2/2
General 27/27
Hardsubx 0/1
Hauppage 3/3
MP4 3/3
NoCC 10/10
Options 86/86
Teletext 7/21
WTV 13/13
XDS 34/34

Your PR breaks these cases:

NOTE: The following tests have been failing on the master branch as well as the PR:


It seems that not all tests were passed completely. This is an indication that the output of some files is not as expected (but might be according to you).

Check the result page for more info.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants