stagefright: misc fixes to software video encoders (and decoders)
- move logic to set encoder parameters to common encoder class
(similarly to what was done for decoders)
- set compressed buffer size based on frame size and compression ratio,
and codec-specific minimum size
- set raw buffer size based on frame size and metadata mode
- do not set stride and slice height on compressed ports
- advertise only QCIF support for google H263 encoder
- set large-enough input size for video decoders to support adaptive
playback
- do not change input buffer size on output port reconfiguration, as
no input buffer reallocation takes place
- do not return empty buffers with EOS after EOS has been signaled
Bug: 18513091
Bug: 18639027
Change-Id: Ib13492ef66adf331aa4572c67d2b283ea020cb41
diff --git a/media/libstagefright/tests/Utils_test.cpp b/media/libstagefright/tests/Utils_test.cpp
index 43e0269..5c323c1 100644
--- a/media/libstagefright/tests/Utils_test.cpp
+++ b/media/libstagefright/tests/Utils_test.cpp
@@ -172,6 +172,13 @@
ASSERT_EQ(divUp(12, 4), 3);
ASSERT_EQ(divUp(13, 4), 4);
+ ASSERT_EQ(align(11, 4), 12);
+ ASSERT_EQ(align(12, 4), 12);
+ ASSERT_EQ(align(13, 4), 16);
+ ASSERT_EQ(align(11, 8), 16);
+ ASSERT_EQ(align(11, 2), 12);
+ ASSERT_EQ(align(11, 1), 11);
+
ASSERT_EQ(abs(5L), 5L);
ASSERT_EQ(abs(-25), 25);