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

[cleanup] Use FFmpeg for AV_RBxx, AV_WBxx and AV_WLxx functions and drop 'BitstreamWriter.cpp' #25183

Merged
merged 2 commits into from May 12, 2024

Conversation

thexai
Copy link
Member

@thexai thexai commented May 10, 2024

Description

  • Use FFmpeg for AV_RBxx, AV_WBxx and AV_WLxx functions
  • Drop utils/BitstreamWriter.cpp

Motivation and context

With #25172 I realized that we are using a replica of FFmpeg AV_RB24, AV_RB32, etc.. functions when the FFmpeg header is available currently <libavutil/intreadwrite.h> and in fact is already used in some places:

const uint16_t frameTime = AV_RB16(data + 2);

Then is a direct replacement to remove duplicated code.

Once replaced also utils/BitstreamWriter.cpp is a dead code because CBitstreamWriter::WriteBits() it's not used in any place.

How has this been tested?

Runtime tested in Shield with Dolby Vision profile 7 file that make use of BitstreamConverter when enabled DV compatibility mode (profile 7 ---> 8 conversion).

What is the effect on users?

nothing

Screenshots (if appropriate):

Types of change

  • Bug fix (non-breaking change which fixes an issue)
  • Clean up (non-breaking change which removes non-working, unmaintained functionality)
  • Improvement (non-breaking change which improves existing functionality)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that will cause existing functionality to change)
  • Cosmetic change (non-breaking change that doesn't touch code)
  • Student submission (PR was done for educational purposes and will be treated as such)
  • None of the above (please explain below)

Checklist:

  • My code follows the Code Guidelines of this project
  • My change requires a change to the documentation, either Doxygen or wiki
  • I have updated the documentation accordingly
  • I have read the Contributing document
  • I have added tests to cover my change
  • All new and existing tests passed

@thexai thexai added Type: Cleanup non-breaking change which removes non-working or unmaintained functionality v22 "P" labels May 10, 2024
@thexai thexai added this to the "P" 22.0 Alpha 1 milestone May 10, 2024
@thexai thexai merged commit f5102b7 into xbmc:master May 12, 2024
2 checks passed
@thexai thexai deleted the cleanup-read/write-bits branch May 12, 2024 06:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Cleanup non-breaking change which removes non-working or unmaintained functionality v22 "P"
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants