Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • VLC VLC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 3.8k
    • Issues 3.8k
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 287
    • Merge requests 287
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • VideoLANVideoLAN
  • VLCVLC
  • Merge requests
  • !1561

Draft: add support for audio (de)emphasis

  • Review changes

  • Download
  • Patches
  • Plain diff
Open Steve Lhomme requested to merge robUx4/vlc:cdda-emphasis/3 into master Mar 09, 2022
  • Overview 41
  • Commits 9
  • Pipelines 3
  • Changes 36

Some CDs, DV, RTP, MPEG Audio files have an emphasis flag set to signify the audio should be "de-emphasis'ed" for proper playback.

This is similar to a transfer function for audio tracks. With different algorithms to use depending on the source type and the flag.

It's normally boosting the trebles and reducing the bass. So when played back, without the intended correction it sounds "bright".

This patchset carries the flag over and tries to add a filter to correct the audio before it's played back. On Windows the API doesn't provide any way to let the hardware do the conversion so we have to do it in software. There's an libavfilted-based converter added in this patchset. We do could our own local implementation with some biquad filters.

In many places the emphasis bits when reading/writing is disabled. Now we can read it properly. We could also write it as long as the output format knows about that flavor, otherwise a conversion should be done. Most of the time it's the same one as the one used in CDs. Soon Matroska will also provide this information.

Edited Mar 10, 2022 by Steve Lhomme
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: cdda-emphasis/3

VideoLAN code repository instance