Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(717)

Unified Diff: media/base/bit_reader_core.h

Issue 599123002: More efficient BitReader::SkipBits for large numbers of bits. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor adjustement in the unit test. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | media/base/bit_reader_core.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/bit_reader_core.h
diff --git a/media/base/bit_reader_core.h b/media/base/bit_reader_core.h
index 6f92d175643e2e0cce1aab9b894d59ede5078768..525d619934bf96ef3ecfbff21babc531a6458f61 100644
--- a/media/base/bit_reader_core.h
+++ b/media/base/bit_reader_core.h
@@ -85,6 +85,11 @@ class MEDIA_EXPORT BitReaderCore {
int bits_read() const;
private:
+ // This function can skip any number of bits but is more efficient
+ // for small numbers. Return false if the given number of bits cannot be
+ // skipped (not enough bits in the stream), true otherwise.
+ bool SkipBitsSmall(int num_bits);
+
// Help function used by ReadBits to avoid inlining the bit reading logic.
bool ReadBitsInternal(int num_bits, uint64* out);
« no previous file with comments | « no previous file | media/base/bit_reader_core.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698