aaa
houxiao
2017-07-24 5e9814a090f20c2b9c39d6efdc9a732b6097ee7d
RtspFace/PL_ColorConv.cpp
@@ -3,7 +3,7 @@
#include "logger.h"
#include <libyuv.h>
#include <PbFaceList.pb.h>
#define SUBSAMPLE(v, a) ((((v) + (a) - 1)) / (a))
struct PL_ColorConv_Internal
{
    uint8_t* buffer;
@@ -94,7 +94,7 @@
        in->buffer = new uint8_t[dstSize];
        in->buffSizeMax = dstSize;
        in->buffSize = dstSize;
        LOG_INFO << "image_scale alloc buffer size=" << dstSize << std::endl;
        LOG_INFO << "image_to_rgb565 alloc buffer size=" << dstSize << std::endl;
    }
    if (srcType == MB_Frame::MBFT_YUV420)
@@ -105,10 +105,10 @@
    }
    else if (srcType == MB_Frame::MBFT_NV12)
    {
        const uint8_t * srcBuffer = (uint8_t *)in->tempFrame.buffer;
        const uint8_t *src_y = srcBuffer;
        const uint8_t *src_uv =  src_y + (srcHeight * srcWidth);
        uint8_t *dst = (uint8_t *) (in->buffer);
        const uint8_t* srcBuffer = (uint8_t*)in->tempFrame.buffer;
        const uint8_t* src_y = srcBuffer;
        const uint8_t* src_uv =  src_y + (srcHeight * srcWidth);
        uint8_t* dst = (uint8_t*)(in->buffer);
        libyuv::NV12ToRGB565(src_y, srcWidth,
                             src_uv, srcWidth,
                             dst, srcWidth * 2,