Bring camera.tulip up (#3)
* add missing core libs for memcpy memset * cast to char * with arithmatic addition * fix all compiler errors * require tulip camera library so it builds * Revert for now camera.tulip
This commit is contained in:
parent
69ec4d3c27
commit
41a7a08521
7 changed files with 13 additions and 6 deletions
|
@ -5,6 +5,8 @@
|
|||
#include <fcntl.h>
|
||||
#include <cutils/list.h>
|
||||
#include <utils/Mutex.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
namespace android {
|
||||
|
||||
|
|
|
@ -814,7 +814,7 @@ void CallbackNotifier::onNextFrameHW(const void* frame)
|
|||
{
|
||||
pbuf->refCnt++;
|
||||
memcpy(cam_buff->data, &buffer_type, 4);
|
||||
memcpy(cam_buff->data + 4, &sInputBuffer, sizeof(VencInputBuffer));
|
||||
memcpy((char *)cam_buff->data + 4, &sInputBuffer, sizeof(VencInputBuffer));
|
||||
|
||||
mDataCBTimestamp(pbuf->timeStamp, CAMERA_MSG_VIDEO_FRAME,
|
||||
cam_buff, 0, mCallbackCookie);
|
||||
|
@ -832,7 +832,7 @@ void CallbackNotifier::onNextFrameHW(const void* frame)
|
|||
if (NULL != cam_buff && NULL != cam_buff->data)
|
||||
{
|
||||
memcpy(cam_buff->data, &buffer_type, 4);
|
||||
memcpy(cam_buff->data + 4, &sInputBuffer, sizeof(VencInputBuffer));
|
||||
memcpy((char *)cam_buff->data + 4, &sInputBuffer, sizeof(VencInputBuffer));
|
||||
mDataCB(CAMERA_MSG_PREVIEW_FRAME, cam_buff, 0, NULL, mCallbackCookie);
|
||||
cam_buff->release(cam_buff);
|
||||
}
|
||||
|
|
|
@ -1670,7 +1670,7 @@ void CameraHardware::releaseRecordingFrame(const void* opaque)
|
|||
{
|
||||
ALOGE("releaseRecordingFrame,error buffer type: %d", buffer_type);
|
||||
}
|
||||
mV4L2CameraDevice->releasePreviewFrame(((VencInputBuffer*)(opaque+4))->nID);
|
||||
mV4L2CameraDevice->releasePreviewFrame(((VencInputBuffer*)((int *)opaque+4))->nID);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#define __HDR_SCENE_MODE__
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <cutils/log.h>
|
||||
#include <math.h>
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#define __NIGHT_SCENE_MODE__
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <cutils/log.h>
|
||||
#include <math.h>
|
||||
|
||||
|
|
|
@ -1662,9 +1662,9 @@ int V4L2CameraDevice::getCurrentFaceFrame(void* frame, int* width, int* height)
|
|||
if ((mCurrentV4l2buf->isThumbAvailable == 1)
|
||||
&& (mCurrentV4l2buf->thumbUsedForPreview == 1))
|
||||
{
|
||||
camera_phy_flush_cache((void*)mCurrentV4l2buf->addrVirY + (ALIGN_16B(mCurrentV4l2buf->width) * mCurrentV4l2buf->height * 3 / 2), ALIGN_16B(mCurrentV4l2buf->thumbWidth) * mCurrentV4l2buf->thumbHeight);
|
||||
camera_phy_flush_cache((char *)mCurrentV4l2buf->addrVirY + (ALIGN_16B(mCurrentV4l2buf->width) * mCurrentV4l2buf->height * 3 / 2), ALIGN_16B(mCurrentV4l2buf->thumbWidth) * mCurrentV4l2buf->thumbHeight);
|
||||
memcpy(frame,
|
||||
(void*)mCurrentV4l2buf->addrVirY + ALIGN_4K((ALIGN_16B(mCurrentV4l2buf->width) * mCurrentV4l2buf->height * 3 / 2)),
|
||||
(char *)mCurrentV4l2buf->addrVirY + ALIGN_4K((ALIGN_16B(mCurrentV4l2buf->width) * mCurrentV4l2buf->height * 3 / 2)),
|
||||
ALIGN_16B(mCurrentV4l2buf->thumbWidth) * mCurrentV4l2buf->thumbHeight);
|
||||
*width = mCurrentV4l2buf->thumbWidth;
|
||||
*height = mCurrentV4l2buf->thumbHeight;
|
||||
|
@ -2033,7 +2033,7 @@ int V4L2CameraDevice::v4l2QueryBuf()
|
|||
i, mVideoBuffer.buf_vir_addr[i], mVideoBuffer.buf_phy_addr[i], buffer_len);
|
||||
|
||||
memset((void*)mVideoBuffer.buf_vir_addr[i], 0x10, mFrameWidth * mFrameHeight);
|
||||
memset((void*)mVideoBuffer.buf_vir_addr[i] + mFrameWidth * mFrameHeight,
|
||||
memset((char *)mVideoBuffer.buf_vir_addr[i] + mFrameWidth * mFrameHeight,
|
||||
0x80, mFrameWidth * mFrameHeight / 2);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
static int cubic_coeff[]={//32-taps
|
||||
0, 256, 0, 0,
|
||||
-3, 255, 4, 0,
|
||||
|
|
Loading…
Reference in a new issue