Merge "DO NOT MERGE - Merge PPRL.190205.001 into master"

gugelfrei
Xin Li 5 years ago committed by Gerrit Code Review
commit ecab82de83

@ -33,8 +33,6 @@ cc_library_static {
cflags: [
"-Werror",
"-Wall",
// Allow implicit fallthroughs in NuPlayer2Driver.cpp until they are fixed.
"-Wno-error=implicit-fallthrough",
],
product_variables: {

@ -25,8 +25,6 @@
#include <media/stagefright/MediaErrors.h>
#include "libyuv/convert_from.h"
#include "libyuv/convert_argb.h"
#include "libyuv/planar_functions.h"
#include "libyuv/video_common.h"
#include <functional>
#include <sys/time.h>
@ -73,16 +71,9 @@ bool ColorConverter::isValid() const {
case OMX_COLOR_FormatCbYCrY:
case OMX_QCOM_COLOR_FormatYVU420SemiPlanar:
case OMX_TI_COLOR_FormatYUV420PackedSemiPlanar:
return mDstFormat == OMX_COLOR_Format16bitRGB565;
case OMX_COLOR_FormatYUV420SemiPlanar:
#ifdef USE_LIBYUV
return mDstFormat == OMX_COLOR_Format16bitRGB565
|| mDstFormat == OMX_COLOR_Format32BitRGBA8888;
#else
case OMX_TI_COLOR_FormatYUV420PackedSemiPlanar:
return mDstFormat == OMX_COLOR_Format16bitRGB565;
#endif
default:
return false;
@ -210,11 +201,7 @@ status_t ColorConverter::convert(
break;
case OMX_COLOR_FormatYUV420SemiPlanar:
#ifdef USE_LIBYUV
err = convertYUV420SemiPlanarUseLibYUV(src, dst);
#else
err = convertYUV420SemiPlanar(src, dst);
#endif
break;
case OMX_TI_COLOR_FormatYUV420PackedSemiPlanar:
@ -327,36 +314,6 @@ status_t ColorConverter::convertYUV420PlanarUseLibYUV(
return OK;
}
status_t ColorConverter::convertYUV420SemiPlanarUseLibYUV(
const BitmapParams &src, const BitmapParams &dst) {
uint8_t *dst_ptr = (uint8_t *)dst.mBits
+ dst.mCropTop * dst.mStride + dst.mCropLeft * dst.mBpp;
const uint8_t *src_y =
(const uint8_t *)src.mBits + src.mCropTop * src.mStride + src.mCropLeft;
const uint8_t *src_u =
(const uint8_t *)src.mBits + src.mStride * src.mHeight
+ src.mCropTop * src.mStride + src.mCropLeft;
switch (mDstFormat) {
case OMX_COLOR_Format16bitRGB565:
libyuv::NV12ToRGB565(src_y, src.mStride, src_u, src.mStride, (uint8 *)dst_ptr,
dst.mStride, src.cropWidth(), src.cropHeight());
break;
case OMX_COLOR_Format32BitRGBA8888:
libyuv::NV12ToARGB(src_y, src.mStride, src_u, src.mStride, (uint8 *)dst_ptr,
dst.mStride, src.cropWidth(), src.cropHeight());
break;
default:
return ERROR_UNSUPPORTED;
}
return OK;
}
std::function<void (void *, void *, void *, size_t,
signed *, signed *, signed *, signed *)>
getReadFromSrc(OMX_COLOR_FORMATTYPE srcFormat) {

@ -78,9 +78,6 @@ private:
status_t convertYUV420PlanarUseLibYUV(
const BitmapParams &src, const BitmapParams &dst);
status_t convertYUV420SemiPlanarUseLibYUV(
const BitmapParams &src, const BitmapParams &dst);
status_t convertYUV420Planar16(
const BitmapParams &src, const BitmapParams &dst);

@ -547,9 +547,11 @@ CaptureSequencer::CaptureState CaptureSequencer::manageStandardCapture(
return DONE;
}
if (l.mParameters.isDeviceZslSupported) {
if ((l.mParameters.isDeviceZslSupported) && (l.mParameters.state != Parameters::RECORD) &&
(l.mParameters.state != Parameters::VIDEO_SNAPSHOT)) {
// If device ZSL is supported, drop all pending preview buffers to reduce the chance of
// rendering preview frames newer than the still frame.
// Additionally, preview must not get interrupted during video recording.
client->getCameraDevice()->dropStreamBuffers(true, client->getPreviewStreamId());
}

Loading…
Cancel
Save