[Movie studio]make exported clip of 1080p as 1920*1080 (1)
BZ: 56801
the original design for 1080p is 1920*1088(container size), which
can't handle some special clips, such as the clip provided in this
bug, this clip only has 1920*1080 valid bit stream; besides the
1920*1088 solution brings a workaound in omx, and one more memory
copy for each frame if the imported clip needs transcoding when
export it.
Signed-off-by: Gu, Wangyi <wangyi.gu@intel.com>
Change-Id: I9757768b508a7b6b0eb0144a86db24cc584bbb1a
Reviewed-on: http://android.intel.com:8080/68301
Reviewed-by: Feng, Wei <wei.feng@intel.com>
Reviewed-by: Tang, Richard <richard.tang@intel.com>
Reviewed-by: Shi, PingX <pingx.shi@intel.com>
Tested-by: Shi, PingX <pingx.shi@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
diff --git a/frameworks/videoedit/lvpp/VideoEditorToolsNV12.c b/frameworks/videoedit/lvpp/VideoEditorToolsNV12.c
index 1cc86ab..e77a908 100644
--- a/frameworks/videoedit/lvpp/VideoEditorToolsNV12.c
+++ b/frameworks/videoedit/lvpp/VideoEditorToolsNV12.c
@@ -1166,8 +1166,8 @@
pixel is replicated here
*/
if (u8Wflag) {
- *pu8_data_out++ = (M4VIFI_UInt8)u32_temp_value1;
- *pu8_data_out++ = (M4VIFI_UInt8)u32_temp_value;
+ *pu8_data_out = (M4VIFI_UInt8)u32_temp_value1;
+ *(pu8_data_out+1) = (M4VIFI_UInt8)u32_temp_value;
}
pu8dum = (pu8_data_out - u32_width_out);
diff --git a/frameworks/videoedit/stagefrightshells/VideoEditorVideoEncoder.cpp b/frameworks/videoedit/stagefrightshells/VideoEditorVideoEncoder.cpp
index 6ad5122..cafc615 100644
--- a/frameworks/videoedit/stagefrightshells/VideoEditorVideoEncoder.cpp
+++ b/frameworks/videoedit/stagefrightshells/VideoEditorVideoEncoder.cpp
@@ -59,6 +59,8 @@
#error "Cannot force DSI retrieval if codec type is not fixed"
#endif
+#define WIDTH_1080P_INTEL 1920
+#define HEIGHT_1080P_INTEL 1080
/********************
* SOURCE CLASS *
********************/
@@ -606,10 +608,13 @@
VIDEOEDITOR_CHECK(
pEncoderContext->mCodecParams->Format == pEncoderContext->mFormat,
M4ERR_PARAMETER);
- VIDEOEDITOR_CHECK(0 == pEncoderContext->mCodecParams->FrameWidth % 16,
- M4ERR_PARAMETER);
- VIDEOEDITOR_CHECK(0 == pEncoderContext->mCodecParams->FrameHeight % 16,
- M4ERR_PARAMETER);
+ if (pEncoderContext->mCodecParams->FrameWidth != WIDTH_1080P_INTEL &&
+ pEncoderContext->mCodecParams->FrameHeight != HEIGHT_1080P_INTEL) {
+ VIDEOEDITOR_CHECK(0 == pEncoderContext->mCodecParams->FrameWidth % 16,
+ M4ERR_PARAMETER);
+ VIDEOEDITOR_CHECK(0 == pEncoderContext->mCodecParams->FrameHeight % 16,
+ M4ERR_PARAMETER);
+ }
/**
* StageFright graph building