Skip to content

Commit

Permalink
Remove unused LebGenerator in ReadBitBuffer.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 632187950
  • Loading branch information
jwcullen committed May 14, 2024
1 parent 8c6c639 commit ef9a451
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
1 change: 0 additions & 1 deletion iamf/common/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ cc_library(
deps = [
":bit_buffer_util",
":macros",
"//iamf/cli:leb_generator",
"//iamf/obu:leb128",
"@com_google_absl//absl/status",
],
Expand Down
6 changes: 2 additions & 4 deletions iamf/common/read_bit_buffer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include <vector>

#include "absl/status/status.h"
#include "iamf/cli/leb_generator.h"
#include "iamf/common/bit_buffer_util.h"
#include "iamf/common/macros.h"
#include "iamf/obu/leb128.h"
Expand Down Expand Up @@ -107,9 +106,8 @@ absl::Status AccumulateUleb128Byte(const uint64_t& byte, const int index,

} // namespace

ReadBitBuffer::ReadBitBuffer(int64_t capacity, std::vector<uint8_t>* source,
const LebGenerator& leb_generator)
: leb_generator_(leb_generator), source_(source) {
ReadBitBuffer::ReadBitBuffer(int64_t capacity, std::vector<uint8_t>* source)
: source_(source) {
bit_buffer_.reserve(capacity);
}

Expand Down
7 changes: 1 addition & 6 deletions iamf/common/read_bit_buffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include <vector>

#include "absl/status/status.h"
#include "iamf/cli/leb_generator.h"
#include "iamf/obu/leb128.h"

namespace iamf_tools {
Expand All @@ -30,10 +29,8 @@ class ReadBitBuffer {
* \param capacity Capacity of the internal buffer in bytes.
* \param source Pointer to the data source from which the read buffer will
* iteratively load data.
* \param leb_generator `LebGenerator` to use.
*/
ReadBitBuffer(int64_t capacity, std::vector<uint8_t>* source,
const LebGenerator& leb_generator = *LebGenerator::Create());
ReadBitBuffer(int64_t capacity, std::vector<uint8_t>* source);

/*!\brief Destructor.*/
~ReadBitBuffer() = default;
Expand Down Expand Up @@ -220,8 +217,6 @@ class ReadBitBuffer {
/*!\brief Empties the buffer.*/
void DiscardAllBits();

LebGenerator leb_generator_;

private:
// Read buffer.
std::vector<uint8_t> bit_buffer_;
Expand Down

0 comments on commit ef9a451

Please sign in to comment.