bool ZsdShot:: createJpegImg(ImgBufInfo const & rSrcImgBufInfo, MUINT32 const u4u4Quality, MUINT32 const u4fgIsSOI, ImgBufInfo const & rJpgImgBufInfo, MUINT32 & u4JpegSize) { //FUNCTION_LOG_START; //MtkCamUtils::CamProfile profile("createJpegImg", "SingleShot"); // // (1). Create Instance ISImager *pISImager = ISImager::createInstance(rSrcImgBufInfo); //CHECK_OBJECT(pISImager); // init setting BufInfo rBufInfo(rJpgImgBufInfo.u4BufSize, rJpgImgBufInfo.u4BufVA, rJpgImgBufInfo.u4BufPA, rJpgImgBufInfo.i4MemID); // pISImager->setTargetBufInfo(rBufInfo); // pISImager->setFormat(eImgFmt_JPEG); // // When ZSDCC, can not do rotation or flip in this stage, only create JPGE. pISImager->setRotation(0); // pISImager->setFlip(0); // pISImager->setResize(rJpgImgBufInfo.u4ImgWidth, rJpgImgBufInfo.u4ImgHeight); // pISImager->setEncodeParam(u4fgIsSOI, u4u4Quality); // pISImager->setROI(Rect(0, 0, rSrcImgBufInfo.u4ImgWidth, rSrcImgBufInfo.u4ImgHeight)); // pISImager->execute(); // u4JpegSize = pISImager->getJpegSize(); pISImager->destroyInstance(); //profile.print(); //FUNCTION_LOG_END; return true; }
MBOOL SingleShot:: createJpegImg(ImgBufInfo const & rSrcImgBufInfo, JpegParam const & rJpgParm, MUINT32 const u4Rot, MUINT32 const u4Flip, ImgBufInfo const & rJpgImgBufInfo, MUINT32 & u4JpegSize) { FUNCTION_LOG_START; AutoCPTLog cptlog(Event_SShot_createJpegImg); MtkCamUtils::CamProfile profile("createJpegImg", "SingleShot"); // // (1). Create Instance CPTLogStr(Event_SShot_createJpegImg, CPTFlagSeparator, "init"); ISImager *pISImager = ISImager::createInstance(rSrcImgBufInfo); CHECK_OBJECT(pISImager); // init setting BufInfo rBufInfo(rJpgImgBufInfo.u4BufSize, rJpgImgBufInfo.u4BufVA, rJpgImgBufInfo.u4BufPA, rJpgImgBufInfo.i4MemID); // pISImager->setTargetBufInfo(rBufInfo); // pISImager->setFormat(eImgFmt_JPEG); // pISImager->setRotation(u4Rot); // pISImager->setFlip(u4Flip); // pISImager->setResize(rJpgImgBufInfo.u4ImgWidth, rJpgImgBufInfo.u4ImgHeight); // pISImager->setEncodeParam(rJpgParm.fgIsSOI, rJpgParm.u4Quality); // pISImager->setROI(Rect(0, 0, rSrcImgBufInfo.u4ImgWidth, rSrcImgBufInfo.u4ImgHeight)); // CPTLogStr(Event_SShot_createJpegImg, CPTFlagSeparator, "execute"); pISImager->execute(); // u4JpegSize = pISImager->getJpegSize(); pISImager->destroyInstance(); profile.print(); FUNCTION_LOG_END; return MTRUE; }