-
Notifications
You must be signed in to change notification settings - Fork 80
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
New adaptive mode for ntsc3d decoder #522
Commits on Aug 3, 2020
-
Fix a typo in the split2D heuristic.
This survives from the original version of this code; it looks like the intent was to use the current and previous lines, not the current line twice. Because they're usually very similar, the difference to the result is tiny -- the cross-colour in the S&W zoneplate is slightly better in a couple of pixels.
Configuration menu - View commit details
-
Copy full SHA for 560617b - Browse repository at this point
Copy the full SHA 560617bView commit details -
Use double rather than qreal in Comb and its supporting code.
This matches the other decoders -- qreal isn't intended as a general floating point type; it's Qt's internal type for coordinates (and doesn't even have to be a floating point type depending on how Qt is configured).
Configuration menu - View commit details
-
Copy full SHA for b8bc9dd - Browse repository at this point
Copy the full SHA b8bc9ddView commit details -
Further improvements to the comments in Comb.
- The 1D filter actually has negative gain. - Explain why split2D uses split1D's result. - Explain how split2D's heuristic works more clearly.
Configuration menu - View commit details
-
Copy full SHA for 31b8649 - Browse repository at this point
Copy the full SHA 31b8649View commit details -
Move Comb::adjustY's definition.
The order of declarations now matches the order in which the functions are called.
Configuration menu - View commit details
-
Copy full SHA for 9d77958 - Browse repository at this point
Copy the full SHA 9d77958View commit details -
Move most of Comb's methods into Comb::FrameBuffer.
Nearly all of the decoding steps are operating on a single frame, so they can be a method of FrameBuffer, rather than a method of Comb that takes a FrameBuffer as a parameter. This simplifies the code quite a bit because it doesn't need to say currentFrameBuffer->... all over the place. The code to load two fields into the framebuffer is also made into a method, and the Get* helpers are renamed to get*.
Configuration menu - View commit details
-
Copy full SHA for ee43c76 - Browse repository at this point
Copy the full SHA ee43c76View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4665a59 - Browse repository at this point
Copy the full SHA 4665a59View commit details -
Fix the unexplained two-pixel offset in adjustY.
Previously the filter delay was also hardcoded as 2, so perhaps the + 2 was originally intended to compensate for the chroma filter (now disabled).
Configuration menu - View commit details
-
Copy full SHA for 5b5398c - Browse repository at this point
Copy the full SHA 5b5398cView commit details -
Make the 1D filter have gain 1, not gain -2.
This simplifies the code a bit later -- e.g. you can subtract the chroma from the composite signal to get the luma, rather than adding them.
Configuration menu - View commit details
-
Copy full SHA for f10e7b1 - Browse repository at this point
Copy the full SHA f10e7b1View commit details -
Use QScopedPointer for current/previousFrameBuffer.
This means we can just create two buffers upfront then cycle between them, which is marginally more efficient than copying the object. For 3D decoding in both directions in the future, we can do exactly the same thing with three buffers. Since the object isn't being copied any more, there's no need for its members to be (efficiently) copyable -- so videoParameters and configuration can be const references, and clpbuffer can be a regular array.
Configuration menu - View commit details
-
Copy full SHA for ff5f991 - Browse repository at this point
Copy the full SHA ff5f991View commit details -
Add MAX_WIDTH and MAX_HEIGHT constants in Comb.
The maximum size was 910x525 or 911x526 in different places before.
Configuration menu - View commit details
-
Copy full SHA for ce87c11 - Browse repository at this point
Copy the full SHA ce87c11View commit details -
The constructor is the real win here (because it's just zero-initialisation), but the operators are short enough to benefit too.
Configuration menu - View commit details
-
Copy full SHA for cee5b4a - Browse repository at this point
Copy the full SHA cee5b4aView commit details -
There's no need for a wrapper to make this heap-allocated now, so the buffer can just be an array in Comb::FrameBuffer, and we no longer have the frame size hardcoded anywhere.
Configuration menu - View commit details
-
Copy full SHA for 2efef88 - Browse repository at this point
Copy the full SHA 2efef88View commit details -
Rename showOpticalFlowMap to showMap.
It's not necessarily optical flow now.
Configuration menu - View commit details
-
Copy full SHA for 5ed8b9f - Browse repository at this point
Copy the full SHA 5ed8b9fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9b5478a - Browse repository at this point
Copy the full SHA 9b5478aView commit details -
Add UI for NTSC 1D/2D/3D and adaptive mode on/off.
1D isn't very useful for real decoding, but it's handy when debugging the 2D/3D decoders because it's used as the basis for both of them.
Configuration menu - View commit details
-
Copy full SHA for 036f5d8 - Browse repository at this point
Copy the full SHA 036f5d8View commit details
Commits on Aug 4, 2020
-
Implement a new ntsc3d adaptive filter.
3D decoding looks for candidates in the current frame and two fields in either direction, using a similarity heuristic based on the output of the existing 2D decoder. The heuristic is a quality tradeoff: it can produce worse results than the non-adaptive 3D decoder for absolutely still images (because of spurious chroma returned by the 2D decoder, and content that's similar enough to fool the 3D heuristic), but overall the results are much better, particularly for animation and other material with repeated fields/frames.
Configuration menu - View commit details
-
Copy full SHA for 5c6406e - Browse repository at this point
Copy the full SHA 5c6406eView commit details