#define NODE_PREFIX "/dev/video"
#define NUM_MAX_STREAM_THREAD (5)
-#define NUM_MAX_REQUEST_MGR_ENTRY (4)
+#define NUM_MAX_REQUEST_MGR_ENTRY (5)
#define NUM_MAX_CAMERA_BUFFERS (16)
#define NUM_BAYER_BUFFERS (8)
#define NUM_SCC_BUFFERS (8)
#define SUBSTREAM_TYPE_PRVCB (3)
#define FLASH_STABLE_WAIT_TIMEOUT (10)
+#define SIG_WAITING_TICK (5000)
+
#ifdef EXYNOS_CAMERA_LOG
#define CAM_LOGV(...) ((void)ALOG(LOG_VERBOSE, LOG_TAG, __VA_ARGS__))
#define CAM_LOGD(...) ((void)ALOG(LOG_DEBUG, LOG_TAG, __VA_ARGS__))
ISS_SUB_END
};
-int SUPPORT_THUMBNAIL_REAR_SIZE[][2] =
-{
- {160, 120},
- {160, 90},
- {144, 96}
-};
-
-int SUPPORT_THUMBNAIL_FRONT_SIZE[][2] =
-{
- {160, 120},
- {160, 160},
- {160, 90},
- {144, 96}
-};
-
enum is_set_flash_command_state {
IS_FLASH_STATE_NONE = 0,
IS_FLASH_STATE_ON = 1,
REGISTERED,
REQUESTED,
CAPTURED,
- METADONE
+ METADONE,
+ COMPLETED
} request_entry_status_t;
typedef struct request_manager_entry {
int m_precaptureTriggerId;
} ctl_flash_info_t;
-typedef struct awb_control_info {
- // UI awb mode indicator
- enum aa_awbmode i_awbMode;
-} ctl_awb_info_t;
-
typedef struct ae_control_info {
// pre-capture notification state
enum ae_state aeStateNoti;
} ctl_ae_info_t;
+typedef struct scene_control_info {
+ // pre-capture notification state
+ enum aa_scene_mode prevSceneMode;
+} ctl_scene_info_t;
+
typedef struct request_control_info {
ctl_flash_info_t flash;
- ctl_awb_info_t awb;
ctl_ae_info_t ae;
ctl_af_info_t af;
+ ctl_scene_info_t scene;
} ctl_request_info_t;
class RequestManager {
int GetNumEntries();
bool IsRequestQueueFull();
- void RegisterRequest(camera_metadata_t *new_request);
+ void RegisterRequest(camera_metadata_t *new_request, int * afMode, uint32_t * afRegion);
void DeregisterRequest(camera_metadata_t **deregistered_request);
bool PrepareFrame(size_t *num_entries, size_t *frame_size,
camera_metadata_t **prepared_frame, int afState);
- int MarkProcessingRequest(ExynosBuffer * buf, int *afMode);
+ int MarkProcessingRequest(ExynosBuffer * buf);
void NotifyStreamOutput(int frameCnt);
void ApplyDynamicMetadata(struct camera2_shot_ext *shot_ext);
void CheckCompleted(int index);
nsecs_t GetTimestamp(int index);
uint8_t GetOutputStreamByFrameCnt(int frameCnt);
uint8_t GetOutputStream(int index);
+ camera2_shot_ext * GetInternalShotExtByFrameCnt(int frameCnt);
+ camera2_shot_ext * GetInternalShotExt(int index);
int FindFrameCnt(struct camera2_shot_ext * shot_ext);
bool IsVdisEnable(void);
int FindEntryIndexByFrameCnt(int frameCnt);
void Dump(void);
int GetNextIndex(int index);
+ int GetPrevIndex(int index);
void SetDefaultParameters(int cropX);
void SetInitialSkip(int count);
int GetSkipCnt();
- void SetFrameIndex(int index);
- int GetFrameIndex();
- void pushSensorQ(int index);
- int popSensorQ();
- void releaseSensorQ();
+ int GetCompletedIndex();
+ void pushSensorQ(int index);
+ int popSensorQ();
+ void releaseSensorQ();
+
+ bool m_vdisEnable;
+
private:
MetadataConverter *m_metadataConverter;
SignalDrivenThread *m_mainThread;
+ Mutex m_numOfEntriesLock;
int m_numOfEntries;
int m_entryInsertionIndex;
int m_entryProcessingIndex;
int m_sensorPipelineSkipCnt;
int m_cropX;
- int m_frameIndex;
+ int m_lastCompletedFrameCnt;
int m_lastAeMode;
int m_lastAaMode;
int m_lastAwbMode;
int bufIndex;
node_info_t *node;
int minUndequedBuffer;
+ bool needsIonMap;
} stream_parameters_t;
typedef struct substream_parameters {
void StartSCCThread(bool threadExists);
int GetAfState();
void SetAfMode(enum aa_afmode afMode);
- void OnAfTriggerStart(int id);
+ void SetAfRegion(uint32_t * afRegion);
void OnAfTrigger(int id);
void OnAfTriggerAutoMacro(int id);
void OnAfTriggerCAFPicture(int id);
exif_attribute_t mExifInfo;
void m_setExifFixedAttribute(void);
void m_setExifChangedAttribute(exif_attribute_t *exifInfo, ExynosRect *rect,
- camera2_shot *currentEntry);
+ camera2_shot_ext *currentEntry);
void m_preCaptureSetter(struct camera2_shot_ext * shot_ext);
void m_preCaptureListenerSensor(struct camera2_shot_ext * shot_ext);
void m_preCaptureListenerISP(struct camera2_shot_ext * shot_ext);
+ void m_preCaptureAeState(struct camera2_shot_ext * shot_ext);
void m_updateAfRegion(struct camera2_shot_ext * shot_ext);
- void m_afTrigger(struct camera2_shot_ext * shot_ext);
+ void m_afTrigger(struct camera2_shot_ext * shot_ext, int mode);
void *m_exynosPictureCSC;
void *m_exynosVideoCSC;
bool m_scp_closing;
bool m_scp_closed;
bool m_wideAspect;
- uint32_t lastAfRegion[4];
+ uint32_t currentAfRegion[4];
float m_zoomRatio;
int m_vdisBubbleCnt;
int m_vdisDupFrame;
mutable Mutex m_qbufLock;
+ mutable Mutex m_jpegEncoderLock;
+ int m_jpegEncodingCount;
+ mutable Mutex m_afModeTriggerLock;
+ bool m_scpForceSuspended;
int m_afState;
int m_afTriggerId;
enum aa_afmode m_afMode;
bool m_AfHwStateFailed;
int m_afPendingTriggerId;
int m_afModeWaitingCnt;
- struct camera2_shot m_jpegMetadata;
+ struct camera2_shot_ext m_jpegMetadata;
int m_scpOutputSignalCnt;
int m_scpOutputImageCnt;
int m_nightCaptureCnt;
int m_nightCaptureFrameCnt;
+ int m_lastSceneMode;
int m_thumbNailW;
int m_thumbNailH;
int m_reprocessStreamId;