diff options
author | Lajos Molnar <lajos@google.com> | 2014-12-11 19:24:16 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-12-11 19:24:16 +0000 |
commit | 2590fc421ccf5e8199d511ff3022b428ee9122e9 (patch) | |
tree | f489352ca8f9921287babe07829720ccc145d9e7 /include | |
parent | 65575de268f4c0d75e6c1172469001ace765fc14 (diff) | |
parent | 3e08ca6709b5a75dc3b779cf3eba8196b08a0245 (diff) | |
download | frameworks_av-2590fc421ccf5e8199d511ff3022b428ee9122e9.zip frameworks_av-2590fc421ccf5e8199d511ff3022b428ee9122e9.tar.gz frameworks_av-2590fc421ccf5e8199d511ff3022b428ee9122e9.tar.bz2 |
am 3e08ca67: resolved conflicts for merge of 6571ed31 to lmp-mr1-dev-plus-aosp
* commit '3e08ca6709b5a75dc3b779cf3eba8196b08a0245':
stagefright: misc fixes to software video encoders (and decoders)
Diffstat (limited to 'include')
-rw-r--r-- | include/media/stagefright/foundation/AUtils.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/media/stagefright/foundation/AUtils.h b/include/media/stagefright/foundation/AUtils.h index 3a73a39..d7ecf50 100644 --- a/include/media/stagefright/foundation/AUtils.h +++ b/include/media/stagefright/foundation/AUtils.h @@ -40,6 +40,12 @@ inline static const T divUp(const T &nom, const T &den) { } } +/* == ceil(nom / den) * den. T must be integer type, alignment must be positive power of 2 */ +template<class T, class U> +inline static const T align(const T &nom, const U &den) { + return (nom + (T)(den - 1)) & (T)~(den - 1); +} + template<class T> inline static T abs(const T &a) { return a < 0 ? -a : a; |