diff options
author | Andreas Huber <andih@google.com> | 2011-09-19 12:18:47 -0700 |
---|---|---|
committer | Andreas Huber <andih@google.com> | 2011-09-19 12:21:33 -0700 |
commit | 89aa8fe4cb00d2f24260005b008602232d678684 (patch) | |
tree | 06d871b702884809f45f70ed71b19917cc93fd3d /media/libstagefright/include/SampleTable.h | |
parent | 84ada693b87f4d9344578e750a506b7789c13eb9 (diff) | |
download | frameworks_av-89aa8fe4cb00d2f24260005b008602232d678684.zip frameworks_av-89aa8fe4cb00d2f24260005b008602232d678684.tar.gz frameworks_av-89aa8fe4cb00d2f24260005b008602232d678684.tar.bz2 |
Remove an O(n^2) algorithm in MPEG4Extractor.cpp to speed up seeks in long streams
containing B-frames.
Change-Id: Ie4dc734d2c2d5a5ce84674bb883f4b27e2278642
related-to-bug: 5336497
Diffstat (limited to 'media/libstagefright/include/SampleTable.h')
-rw-r--r-- | media/libstagefright/include/SampleTable.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/media/libstagefright/include/SampleTable.h b/media/libstagefright/include/SampleTable.h index a6a6524..847dff7 100644 --- a/media/libstagefright/include/SampleTable.h +++ b/media/libstagefright/include/SampleTable.h @@ -86,6 +86,8 @@ protected: ~SampleTable(); private: + struct CompositionDeltaLookup; + static const uint32_t kChunkOffsetType32; static const uint32_t kChunkOffsetType64; static const uint32_t kSampleSizeType32; @@ -117,6 +119,7 @@ private: uint32_t *mCompositionTimeDeltaEntries; size_t mNumCompositionTimeDeltaEntries; + CompositionDeltaLookup *mCompositionDeltaLookup; off64_t mSyncSampleOffset; uint32_t mNumSyncSamples; @@ -135,8 +138,7 @@ private: friend struct SampleIterator; status_t getSampleSize_l(uint32_t sample_index, size_t *sample_size); - - uint32_t getCompositionTimeOffset(uint32_t sampleIndex) const; + uint32_t getCompositionTimeOffset(uint32_t sampleIndex); static int CompareIncreasingTime(const void *, const void *); |