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

libhb: fix availability of left/right only mixdowns. #5054

Merged
2 commits merged into from Apr 14, 2023
Merged

libhb: fix availability of left/right only mixdowns. #5054

2 commits merged into from Apr 14, 2023

Conversation

ghost
Copy link

@ghost ghost commented Apr 7, 2023

Mixdowns introduced in 8d9969f

Availability was (probably accidentally) extended to supersets of Stereo input in e7b1636

    /*
     * The following mixdowns have a very specific purpose!!!
     *
     * Given 2-channel input, they allow discarding either of the right or
     * left channel to produce mono output instead of downmixing (the latter
     * may clip or lower volume depending on whether the downmix coefficients
     * are normalized or not). They are meant to be used for sources which
     * are known to actually be Mono (identical content in the L/R channels
     * or one of L/R is actually empty). They hardly make any sense when the
     * input has more than two channels.
     *
     * Thus specifically only allow them for Stereo input (layout == STEREO).
     */
    case HB_AMIXDOWN_LEFT:
    case HB_AMIXDOWN_RIGHT:
        return (layout == AV_CH_LAYOUT_STEREO);

@ghost
Copy link
Author

ghost commented Apr 7, 2023

@jstebbins I think I brought this up on IRC when I originally discovered it, but I cannot remember exactly what came of it (if you had a specific reason to enable the mixdowns for more-than-Stereo input or if you just asked me to fix it and I just never got around to it in, erm, about 5 years).

Mixdowns introduced in 8d9969f
Availability was (probably accidentally) extended to supersets
of Stereo input in e7b1636
@ghost
Copy link
Author

ghost commented Apr 13, 2023

Added a commit to work around issue #3533 by forcing output samplerate to input samplerate.

(how) do we typically reference github issues in commit messages: should I use the full URL, just the issue number, or not mention it in the commit message at all?

@galad87
Copy link
Contributor

galad87 commented Apr 13, 2023

The issue number is enough imho.

Easier than properly fixing the rather dirty
hack that's used to implement said mixdowns.

Works around issue #3533
@ghost ghost merged commit 3e16b13 into HandBrake:master Apr 14, 2023
4 checks passed
@ghost ghost deleted the 2023mixdown branch April 15, 2023 00:56
@bradleysepos bradleysepos added this to the 1.7.0 milestone Nov 12, 2023
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

None yet

3 participants