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

Show the current chroma decoder's output on the ld-analyse scope #640

Merged
merged 7 commits into from
May 30, 2021

Conversation

atsampson
Copy link
Collaborator

This replaces ld-analyse's old 1D filters, and it means that you can see the effect of chroma decoder configuration changes - including noise reduction - interactively on the scope.

I've refactored TbcSource as part of this - it now acts more like a player that you can seek to a particular frame, so the decoder and the different analysis views all use the same cached data. The same infrastructure should make it fairly straightforward to add a vectorscope or other kinds of displays.

Fixes #305.

yuvscope

This can be used in all the places where the image cache is invalidated,
rather than having two different variables.
This avoids fetching the metadata for each field twice, so it's a bit
faster overall (although jsonwax is still very, very slow).

Also avoid calling getNumberOfFrames for each iteration of the loop.
Previously all the methods that got data from TbcSource took a frame
number as an argument, which meant they all had to load frame metadata
individually.

There's now a loadFrame method that you call when the current frame
changes (which only happens in one place in ld-analyse), and this caches
the metadata for the other methods to use directly.

The chapter search methods still take a frame number because they're
only searching the chapter map.
This was the same in the constructor and when loading a new file, and it
would make sense to do this when closing a file as well.
This means we don't need to load the source fields again when drawing
charts.

As before, we still reload the source fields whenever the decoder
parameters are changed. This could be avoided by looking to see whether
the amount of lookbehind/ahead has actually changed or not, but the
performance impact probably doesn't make it worthwhile.
More specifically, show the chroma decoder's luma output as the Y trace,
and the difference between that and the composite signal as the C trace.
This is not quite correct, but it's close enough for most purposes --
resynthesising the actual C signal from the UV output would require us
to know the chroma phase for each line as well.

Since the chroma decoder's output is only meaningful in the active
region, clip the Y/C traces to the active region both horizontally and
vertically (previously they started at the end of the colourburst).
@atsampson atsampson added enhancement ld-decode-tools An issue only affecting the ld-decode-tools labels May 16, 2021
@atsampson atsampson requested a review from simoninns May 16, 2021 01:52
@atsampson atsampson merged commit 9b3709c into happycube:master May 30, 2021
@atsampson atsampson deleted the yuvscope branch May 30, 2021 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement ld-decode-tools An issue only affecting the ld-decode-tools
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Show real chroma decoder output in ld-analyse line scope
1 participant