summaryrefslogtreecommitdiffstats
path: root/libvideoeditor/vss
diff options
context:
space:
mode:
authorRajneesh Chowdury <rajneeshc@google.com>2011-08-19 10:56:45 -0700
committerRajneesh Chowdury <rajneeshc@google.com>2011-08-23 10:59:54 -0700
commit16ecf765405a22118e9d3bd2d3c22df374794dcf (patch)
treee23433605bb2614d990693f9c3e3603ba1ea2246 /libvideoeditor/vss
parent0a25bd5bacf5408ca205b15e53cfb6dc2fc1d171 (diff)
downloadframeworks_av-16ecf765405a22118e9d3bd2d3c22df374794dcf.zip
frameworks_av-16ecf765405a22118e9d3bd2d3c22df374794dcf.tar.gz
frameworks_av-16ecf765405a22118e9d3bd2d3c22df374794dcf.tar.bz2
Fix for 5151331 [CRESPO] testPerformanceExport failed
Ensure encoding width and height are multiple of 16. Change-Id: Ia077a52a16273cb9f775ebe0f0c66a81a35b9e19
Diffstat (limited to 'libvideoeditor/vss')
-rwxr-xr-xlibvideoeditor/vss/mcs/src/M4MCS_API.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/libvideoeditor/vss/mcs/src/M4MCS_API.c b/libvideoeditor/vss/mcs/src/M4MCS_API.c
index 8a93720..5eb2a75 100755
--- a/libvideoeditor/vss/mcs/src/M4MCS_API.c
+++ b/libvideoeditor/vss/mcs/src/M4MCS_API.c
@@ -3732,10 +3732,44 @@ M4OSA_ERR M4MCS_setOutputParams( M4MCS_Context pContext,
pC->EncodingWidth = pC->InputFileProperties.uiVideoWidth;
uiFrameHeight =
pC->EncodingHeight = pC->InputFileProperties.uiVideoHeight;
+
/**
* Set output video profile and level */
pC->encodingVideoProfile = pC->InputFileProperties.uiVideoProfile;
pC->encodingVideoLevel = pC->InputFileProperties.uiVideoLevel;
+
+ // Clip's original width and height may not be
+ // multiple of 16.
+ // Ensure encoding width and height are multiple of 16
+
+ uint32_t remainder = pC->EncodingWidth % 16;
+ if (remainder != 0) {
+ if (remainder >= 8) {
+ // Roll forward
+ pC->EncodingWidth =
+ pC->EncodingWidth + (16-remainder);
+ } else {
+ // Roll backward
+ pC->EncodingWidth =
+ pC->EncodingWidth - remainder;
+ }
+ uiFrameWidth = pC->EncodingWidth;
+ }
+
+ remainder = pC->EncodingHeight % 16;
+ if (remainder != 0) {
+ if (remainder >= 8) {
+ // Roll forward
+ pC->EncodingHeight =
+ pC->EncodingHeight + (16-remainder);
+ } else {
+ // Roll backward
+ pC->EncodingHeight =
+ pC->EncodingHeight - remainder;
+ }
+ uiFrameHeight = pC->EncodingHeight;
+ }
+
}
else
{