diff options
author | Ankit Premrajka <ankitp@codeaurora.org> | 2011-11-21 19:25:02 -0800 |
---|---|---|
committer | Gerrit Code Review <gerrit@review.cyanogenmod.com> | 2012-12-05 23:39:35 -0800 |
commit | bfd1c91937c47898a146ba769793978c6a611468 (patch) | |
tree | 085eb52b7bf2d2ff9cf1e9044ee37f73eec13883 /include | |
parent | 4e5350799c058af24649f3f790ac990b9314711e (diff) | |
download | frameworks_av-bfd1c91937c47898a146ba769793978c6a611468.zip frameworks_av-bfd1c91937c47898a146ba769793978c6a611468.tar.gz frameworks_av-bfd1c91937c47898a146ba769793978c6a611468.tar.bz2 |
Camera: Qcom parameters partial rebase
Add customized parameters for qcom camera features.
Squashed commit of the following submissions to CAF:
camera: add custom camera parameters to hardware java file.
Change-Id: Ic2b363df6d25a0c3a49aed30e717d10874f533ae
Camera: Add support for wavelet denoise
Change-Id: I97be72615fe5909987ac430034bbdc16f2d20509
Camera : Add support for histogram in frameworks
Change-Id: Ibf751c3b2d488f4be0afaaa3e994372bafeffbe7
Camera: Add ZSL support in framework.
Change-Id: I4e863020d7d407d9c3936beb83dc7abf385c4654
Camera: Add touch AF/AEC support in ICS framework
In, ICS the old touch AF/AEC functions getTouchIndexAf(),
setTouchIndexAf() etc are no longer valid. Added new functions to get
the center of touched area.
Change-Id: I37d00040f895cd8a4de2e2a438971aa2d9c1a045
Camera: Add support for Red eye reduction
Change-Id: Iada280ac33aee8b1114dc40d8d79e0e47ad5c2fd
Conflicts:
api/current.txt
Camera: Enable streaming texture and YV12 feature
Change-Id: I814c92b469e0f25baef0ce80338761d1e6443085
Camera: Add frameworks support for high frame rate
Change-Id: I9722e9b7e61433651ab5f76f76208853eb1fd849
Camera: Simplify ASD menu and best mode menu.
Change-Id: Ia7a1eca9268eec021a6e2c3f7ce2a932e8819d50
Camera : Macro definition change. PIXEL_FORMAT_YV12 to "yuv420p"
Why: CTS testcase is expecting "yuv420p" as the format string for YV12 mode.
CRs-Fixed: 328252
(cherry picked from commit 0a263f67b75497e4b95b9de8c370ed9496ab59ef)
Change-Id: I66f418a52775a969d81bcb332bbe500370e3ab7c
Camera: Changes for face detection
Change-Id: I7b2172e8690d6e23762e42f5888fecbfda15ba61
Camera: Add support for burst count
Change-Id: I4488a5eac1eebb0b5c8e2cc7cbbe7be0c7301be7
Camera: enable HDR feature
(cherry picked from commit e40770bbdadd925fc1e07a08249a15981b961570)
Change-Id: Ie9ca3066e8e53710bf292d047a3724aefc029854
Camera : Add API to find fullsize liveshot support
Change-Id: I3c2fc3578decbe5cf87fded5362f317df0b40b5e
(cherry picked from commit 65d80f04892776eec1c19c844eacb8c454b4bd1a)
Camera: Set default camera area string
The default invalid value for KEY_FOCUS_AREA and
KEY_METERING_AREA is changed to "(0,0,0,0,0)"
CRs-fixed: 334934
Change-Id: I354802c8611ee5c00a591b96b1a1ca04926969cb
Camera: Change the scenemode names in framework
To comply with ICS API Specification,
SCENE_MODE_AUTO changed to SCENE_MODE_ASD
SCENE_MODE_OFF changed to SCENE_MODE_AUTO
Change-Id: I8e744f10c728f469923b09f69d6d64bc5c7c6850
Camera : Framework changes for camcorder UI menu
Change-Id: Iff9e9021da44b67f81a24c828b960113ee249248
Camera : Remove unwanted video resolution in Framework
- FWVGA, WQVGA resolution UI options are removed for camcorder.
Change-Id: If621140966b01dbc8c30a4d161e6771528b8adda
Camera : Enable FWVGA and WQVGA resolutions in camcorder media profiles
Change-Id: Iad9cc33f7b6d8eb7de21df372c016edeef0b99ba
Unlock camera AWB lock only when white-balance is changed.
bug:5633546
Change-Id: I90bb4b5b445daedf38a64e2f8fb980fc0f0aaa81
Change-Id: Ie3cc15132489502e64321776d49d96846b5705d6
Conflicts:
camera/Android.mk
camera/CameraParameters.cpp
include/camera/CameraParameters.h
services/camera/libcameraservice/CameraService.cpp
services/camera/libcameraservice/CameraService.h
Diffstat (limited to 'include')
-rw-r--r-- | include/camera/CameraParameters.h | 238 | ||||
-rw-r--r-- | include/media/MediaProfiles.h | 9 | ||||
-rw-r--r-- | include/media/mediarecorder.h | 3 |
3 files changed, 247 insertions, 3 deletions
diff --git a/include/camera/CameraParameters.h b/include/camera/CameraParameters.h index c4c2f09..b6d1582 100644 --- a/include/camera/CameraParameters.h +++ b/include/camera/CameraParameters.h @@ -36,7 +36,21 @@ struct Size { height = h; } }; - +#ifdef QCOM_HARDWARE +struct FPSRange{ + int minFPS; + int maxFPS; + + FPSRange(){ + minFPS=0; + maxFPS=0; + }; + FPSRange(int min,int max){ + minFPS=min; + maxFPS=max; + }; +}; +#endif class CameraParameters { public: @@ -91,6 +105,10 @@ public: void setPreviewFrameRate(int fps); int getPreviewFrameRate() const; void getPreviewFpsRange(int *min_fps, int *max_fps) const; +#ifdef QCOM_HARDWARE + void setPreviewFrameRateMode(const char *mode); + const char *getPreviewFrameRateMode() const; +#endif void setPreviewFormat(const char *format); const char *getPreviewFormat() const; void setPictureSize(int width, int height); @@ -98,6 +116,14 @@ public: void getSupportedPictureSizes(Vector<Size> &sizes) const; void setPictureFormat(const char *format); const char *getPictureFormat() const; +#ifdef QCOM_HARDWARE + void setTouchIndexAec(int x, int y); + void getTouchIndexAec(int *x, int *y) const; + void setTouchIndexAf(int x, int y); + void getTouchIndexAf(int *x, int *y) const; +#endif + + void getMeteringAreaCenter(int * x, int *y) const; void dump() const; status_t dump(int fd, const Vector<String16>& args) const; @@ -112,6 +138,11 @@ public: // Supported preview frame sizes in pixels. // Example value: "800x600,480x320". Read only. static const char KEY_SUPPORTED_PREVIEW_SIZES[]; +#ifdef QCOM_HARDWARE + // Supported PREVIEW/RECORDING SIZES IN HIGH FRAME RATE recording, sizes in pixels. + // Example value: "800x480,432x320". Read only. + static const char KEY_SUPPORTED_HFR_SIZES[]; +#endif // The current minimum and maximum preview fps. This controls the rate of // preview frames received (CAMERA_MSG_PREVIEW_FRAME). The minimum and // maximum fps must be one of the elements from @@ -141,6 +172,14 @@ public: // Supported number of preview frames per second. // Example value: "24,15,10". Read. static const char KEY_SUPPORTED_PREVIEW_FRAME_RATES[]; +#ifdef QCOM_HARDWARE + // The mode of preview frame rate. + // Example value: "frame-rate-auto, frame-rate-fixed". + static const char KEY_PREVIEW_FRAME_RATE_MODE[]; + static const char KEY_SUPPORTED_PREVIEW_FRAME_RATE_MODES[]; + static const char KEY_PREVIEW_FRAME_RATE_AUTO_MODE[]; + static const char KEY_PREVIEW_FRAME_RATE_FIXED_MODE[]; +#endif // The dimensions for captured pictures in pixels (width x height). // Example value: "1024x768". Read/write. static const char KEY_PICTURE_SIZE[]; @@ -203,6 +242,12 @@ public: // header. // Example value: "21.0" or "-5". Write only. static const char KEY_GPS_ALTITUDE[]; + +#ifdef QCOM_HARDWARE + static const char KEY_SKIN_TONE_ENHANCEMENT[] ; + static const char KEY_SUPPORTED_SKIN_TONE_ENHANCEMENT_MODES[] ; +#endif + // GPS timestamp (UTC in seconds since January 1, 1970). This should be // stored in JPEG EXIF header. // Example value: "1251192757". Write only. @@ -222,6 +267,15 @@ public: // Supported color effect settings. // Example value: "none,mono,sepia". Read only. static const char KEY_SUPPORTED_EFFECTS[]; +#ifdef QCOM_HARDWARE + //Touch Af/AEC settings. + static const char KEY_TOUCH_AF_AEC[]; + static const char KEY_SUPPORTED_TOUCH_AF_AEC[]; + //Touch Index for AEC. + static const char KEY_TOUCH_INDEX_AEC[]; + //Touch Index for AF. + static const char KEY_TOUCH_INDEX_AF[]; +#endif // Current antibanding setting. // Example value: "auto" or ANTIBANDING_XXX constants. Read/write. static const char KEY_ANTIBANDING[]; @@ -234,6 +288,14 @@ public: // Supported scene mode settings. // Example value: "auto,night,fireworks". Read only. static const char KEY_SUPPORTED_SCENE_MODES[]; +#ifdef QCOM_HARDWARE + // Current auto scene detection mode. + // Example value: "off" or SCENE_DETECT_XXX constants. Read/write. + static const char KEY_SCENE_DETECT[]; + // Supported auto scene detection settings. + // Example value: "off,backlight,snow/cloudy". Read only. + static const char KEY_SUPPORTED_SCENE_DETECT[]; +#endif // Current flash mode. // Example value: "auto" or FLASH_MODE_XXX constants. Read/write. static const char KEY_FLASH_MODE[]; @@ -505,6 +567,23 @@ public: // captured pictures. // Example value: "true" or "false". Read only. static const char KEY_VIDEO_SNAPSHOT_SUPPORTED[]; + static const char KEY_FULL_VIDEO_SNAP_SUPPORTED[]; + +#ifdef QCOM_HARDWARE + static const char KEY_ISO_MODE[]; + static const char KEY_SUPPORTED_ISO_MODES[]; + static const char KEY_LENSSHADE[] ; + static const char KEY_SUPPORTED_LENSSHADE_MODES[] ; + + static const char KEY_AUTO_EXPOSURE[]; + static const char KEY_SUPPORTED_AUTO_EXPOSURE[]; + + static const char KEY_GPS_LATITUDE_REF[]; + static const char KEY_GPS_LONGITUDE_REF[]; + static const char KEY_GPS_ALTITUDE_REF[]; + static const char KEY_GPS_STATUS[]; + static const char KEY_EXIF_DATETIME[]; +#endif // The state of the video stabilization. If set to true, both the // preview stream and the recorded video stream are stabilized by @@ -520,6 +599,20 @@ public: // has no effect on still image capture. static const char KEY_VIDEO_STABILIZATION[]; +#ifdef QCOM_HARDWARE + static const char KEY_MEMORY_COLOR_ENHANCEMENT[]; + static const char KEY_SUPPORTED_MEM_COLOR_ENHANCE_MODES[]; + + static const char KEY_ZSL[]; + static const char KEY_SUPPORTED_ZSL_MODES[]; + + static const char KEY_CAMERA_MODE[]; + + static const char KEY_VIDEO_HIGH_FRAME_RATE[]; + static const char KEY_SUPPORTED_VIDEO_HIGH_FRAME_RATE_MODES[]; + static const char KEY_HIGH_DYNAMIC_RANGE_IMAGING[]; + static const char KEY_SUPPORTED_HDR_IMAGING_MODES[]; +#endif // Returns true if video stabilization is supported. That is, applications // can set KEY_VIDEO_STABILIZATION to true and have a stabilized preview // stream and record stabilized videos. @@ -536,6 +629,7 @@ public: static const char KEY_WDR[]; static const char KEY_WEATHER[]; #endif + static const char KEY_AE_BRACKET_HDR[]; // Value for KEY_ZOOM_SUPPORTED or KEY_SMOOTH_ZOOM_SUPPORTED. static const char TRUE[]; @@ -544,6 +638,24 @@ public: // Value for KEY_FOCUS_DISTANCES. static const char FOCUS_DISTANCE_INFINITY[]; +#ifdef QCOM_HARDWARE + // DENOISE + static const char KEY_DENOISE[]; + static const char KEY_SUPPORTED_DENOISE[]; + + //Selectable zone AF. + static const char KEY_SELECTABLE_ZONE_AF[]; + static const char KEY_SUPPORTED_SELECTABLE_ZONE_AF[]; + + //Face Detection + static const char KEY_FACE_DETECTION[]; + static const char KEY_SUPPORTED_FACE_DETECTION[]; + + //Redeye Reduction + static const char KEY_REDEYE_REDUCTION[]; + static const char KEY_SUPPORTED_REDEYE_REDUCTION[]; +#endif + // Values for white balance settings. static const char WHITE_BALANCE_AUTO[]; static const char WHITE_BALANCE_INCANDESCENT[]; @@ -564,6 +676,15 @@ public: static const char EFFECT_WHITEBOARD[]; static const char EFFECT_BLACKBOARD[]; static const char EFFECT_AQUA[]; +#ifdef QCOM_HARDWARE + static const char EFFECT_EMBOSS[]; + static const char EFFECT_SKETCH[]; + static const char EFFECT_NEON[]; + + // Values for Touch AF/AEC + static const char TOUCH_AF_AEC_OFF[] ; + static const char TOUCH_AF_AEC_ON[] ; +#endif // Values for antibanding settings. static const char ANTIBANDING_AUTO[]; @@ -588,6 +709,7 @@ public: // Values for scene mode settings. static const char SCENE_MODE_AUTO[]; + static const char SCENE_MODE_ASD[]; static const char SCENE_MODE_ACTION[]; static const char SCENE_MODE_PORTRAIT[]; static const char SCENE_MODE_LANDSCAPE[]; @@ -602,6 +724,11 @@ public: static const char SCENE_MODE_SPORTS[]; static const char SCENE_MODE_PARTY[]; static const char SCENE_MODE_CANDLELIGHT[]; +#ifdef QCOM_HARDWARE + static const char SCENE_MODE_BACKLIGHT[]; + static const char SCENE_MODE_FLOWERS[]; + static const char SCENE_MODE_AR[]; +#endif // Applications are looking for a barcode. Camera driver will be optimized // for barcode reading. static const char SCENE_MODE_BARCODE[]; @@ -612,8 +739,15 @@ public: // Pixel color formats for KEY_PREVIEW_FORMAT, KEY_PICTURE_FORMAT, // and KEY_VIDEO_FRAME_FORMAT +#ifdef QCOM_HARDWARE + static const char SCENE_DETECT_OFF[]; + static const char SCENE_DETECT_ON[]; +#endif static const char PIXEL_FORMAT_YUV422SP[]; static const char PIXEL_FORMAT_YUV420SP[]; // NV21 +#ifdef QCOM_HARDWARE + static const char PIXEL_FORMAT_YUV420SP_ADRENO[]; // ADRENO +#endif static const char PIXEL_FORMAT_YUV422I[]; // YUY2 static const char PIXEL_FORMAT_YUV420P[]; // YV12 static const char PIXEL_FORMAT_RGB565[]; @@ -622,9 +756,16 @@ public: // Raw bayer format used for images, which is 10 bit precision samples // stored in 16 bit words. The filter pattern is RGGB. static const char PIXEL_FORMAT_BAYER_RGGB[]; + // Pixel format is not known to the framework static const char PIXEL_FORMAT_ANDROID_OPAQUE[]; +#ifdef QCOM_HARDWARE + static const char PIXEL_FORMAT_RAW[]; + static const char PIXEL_FORMAT_YV12[]; // NV21 + static const char PIXEL_FORMAT_NV12[]; //NV12 +#endif + // Values for focus mode settings. // Auto-focus mode. Applications should call // CameraHardwareInterface.autoFocus to start the focus in this mode. @@ -676,6 +817,101 @@ public: // other modes. static const char FOCUS_MODE_CONTINUOUS_PICTURE[]; +#ifdef QCOM_HARDWARE + // Normal focus mode. Applications should call + // CameraHardwareInterface.autoFocus to start the focus in this mode. + static const char FOCUS_MODE_NORMAL[]; + static const char ISO_AUTO[]; + static const char ISO_HJR[] ; + static const char ISO_100[]; + static const char ISO_200[] ; + static const char ISO_400[]; + static const char ISO_800[]; + static const char ISO_1600[]; + // Values for Lens Shading + static const char LENSSHADE_ENABLE[] ; + static const char LENSSHADE_DISABLE[] ; + + // Values for auto exposure settings. + static const char AUTO_EXPOSURE_FRAME_AVG[]; + static const char AUTO_EXPOSURE_CENTER_WEIGHTED[]; + static const char AUTO_EXPOSURE_SPOT_METERING[]; + + static const char KEY_SHARPNESS[]; + static const char KEY_MAX_SHARPNESS[]; + static const char KEY_CONTRAST[]; + static const char KEY_MAX_CONTRAST[]; + static const char KEY_SATURATION[]; + static const char KEY_MAX_SATURATION[]; + + static const char KEY_HISTOGRAM[] ; + static const char KEY_SUPPORTED_HISTOGRAM_MODES[] ; + // Values for HISTOGRAM + static const char HISTOGRAM_ENABLE[] ; + static const char HISTOGRAM_DISABLE[] ; + + // Values for SKIN TONE ENHANCEMENT + static const char SKIN_TONE_ENHANCEMENT_ENABLE[] ; + static const char SKIN_TONE_ENHANCEMENT_DISABLE[] ; + + // Values for Denoise + static const char DENOISE_OFF[] ; + static const char DENOISE_ON[] ; + + // Values for auto exposure settings. + static const char SELECTABLE_ZONE_AF_AUTO[]; + static const char SELECTABLE_ZONE_AF_SPOT_METERING[]; + static const char SELECTABLE_ZONE_AF_CENTER_WEIGHTED[]; + static const char SELECTABLE_ZONE_AF_FRAME_AVERAGE[]; + + // Values for Face Detection settings. + static const char FACE_DETECTION_OFF[]; + static const char FACE_DETECTION_ON[]; + + // Values for MCE settings. + static const char MCE_ENABLE[]; + static const char MCE_DISABLE[]; + + // Values for ZSL settings. + static const char ZSL_OFF[]; + static const char ZSL_ON[]; + + // Values for HDR Bracketing settings. + static const char AE_BRACKET_HDR_OFF[]; + static const char AE_BRACKET_HDR[]; + static const char AE_BRACKET[]; + + // Values for HFR settings. + static const char VIDEO_HFR_OFF[]; + static const char VIDEO_HFR_2X[]; + static const char VIDEO_HFR_3X[]; + static const char VIDEO_HFR_4X[]; + + // Values for Redeye Reduction settings. + static const char REDEYE_REDUCTION_ENABLE[]; + static const char REDEYE_REDUCTION_DISABLE[]; + // Values for HDR settings. + static const char HDR_ENABLE[]; + static const char HDR_DISABLE[]; + + // Values for Redeye Reduction settings. + // static const char REDEYE_REDUCTION_ENABLE[]; + // static const char REDEYE_REDUCTION_DISABLE[]; + // Values for HDR settings. + // static const char HDR_ENABLE[]; + // static const char HDR_DISABLE[]; + + enum { + CAMERA_ORIENTATION_UNKNOWN = 0, + CAMERA_ORIENTATION_PORTRAIT = 1, + CAMERA_ORIENTATION_LANDSCAPE = 2, + }; + int getOrientation() const; + void setOrientation(int orientation); + void setPreviewFpsRange(int minFPS,int maxFPS); + void getSupportedHfrSizes(Vector<Size> &sizes) const; +#endif + private: DefaultKeyedVector<String8,String8> mMap; }; diff --git a/include/media/MediaProfiles.h b/include/media/MediaProfiles.h index 9fc962c..60d6bef 100644 --- a/include/media/MediaProfiles.h +++ b/include/media/MediaProfiles.h @@ -32,8 +32,13 @@ enum camcorder_quality { CAMCORDER_QUALITY_480P = 4, CAMCORDER_QUALITY_720P = 5, CAMCORDER_QUALITY_1080P = 6, - CAMCORDER_QUALITY_QVGA = 7, - CAMCORDER_QUALITY_LIST_END = 7, + CAMCORDER_QUALITY_QVGA = 11, + CAMCORDER_QUALITY_FWVGA = 7, + CAMCORDER_QUALITY_WVGA = 8, + CAMCORDER_QUALITY_VGA = 9, + CAMCORDER_QUALITY_WQVGA = 10, + + CAMCORDER_QUALITY_LIST_END = 11, CAMCORDER_QUALITY_TIME_LAPSE_LIST_START = 1000, CAMCORDER_QUALITY_TIME_LAPSE_LOW = 1000, diff --git a/include/media/mediarecorder.h b/include/media/mediarecorder.h index 6d304e0..3c2e700 100644 --- a/include/media/mediarecorder.h +++ b/include/media/mediarecorder.h @@ -118,6 +118,9 @@ enum media_recorder_event_type { MEDIA_RECORDER_EVENT_LIST_START = 1, MEDIA_RECORDER_EVENT_ERROR = 1, MEDIA_RECORDER_EVENT_INFO = 2, +#ifdef QCOM_HARDWARE + MEDIA_RECORDER_MSG_COMPRESSED_IMAGE = 8, // mzhu: TODO, where to put this? +#endif MEDIA_RECORDER_EVENT_LIST_END = 99, // Track related event types |