Optimized S-VHS subdeemphasis, removed VHS-HQ #193
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I removed VHS-HQ, because it never worked correctly: The alternating luma offsets could not be detected reliable based field type or chroma phase. Using
--ire0_adjust
will correct luma offsets from VHS-HQ reliable and independent of any kind track/phase detection. Using the VHSHQ tape format will now result in a warning and enable--ire0_adjust
. The code for the alternating luma offsets is not removed, in case other formats need itI optimized the S-VHS linear subdeemphasis: The previous implementation used filter tables created with LTSpice. The LTSpice simulation tables included a bandwidth limitation of the op amp that were corrected with a shelf EQ in vhs-decode, which introduced some high frequency noise.
The new filter is based on theoretical analysis of the (previously simulated) circuit. The filter is not a "digital filter", but an "analog filter" (digital and analog refer to the type of calculation, of course this filter is completely digital). For calculating the filter for fft from the "analog" coefficients the function
analog_filtfft
was introduced, that uses scipy just likefiltfilt
to create the filter table.The values for these filter seem to differ not only for SP/LP, but also for different manufacturers (devices?). As newer devices have the subdeemphasis fully integrated in a IC, only for older machines these values can taken from service manuals. I included the values from a Sony (SP) and a Panasonic (SP and LP) machine, as well as hand-tuned values to a recording I made on my JVC deck
Still open: