MTK-相机(Camera)像素差值设置

MTK-相机(Camera)像素差值设置

MTK 相机像素差值和做假
CameraAndroid摄像头
图像比例 拍出图像像素 代码中字串id 相机界面显示像素(英文)
4:3 320x240 @string/pref_camera_picturesize_entry_320x240 QVGA
640x480 @string/pref_camera_picturesize_entry_640x480 VGA
1024x768 @string/pref_camera_picturesize_entry_1024x768 1M
1280x960 @string/pref_camera_picturesize_entry_1280x960 1.3M
1600x1200 @string/pref_camera_picturesize_entry_1600x1200 2M
2048x1536 @string/pref_camera_picturesize_entry_2048x1536 3M
2560x1920 @string/pref_camera_picturesize_entry_2592x1936 5M
3264x2448 @string/pref_camera_picturesize_entry_3264x2448 8M
3600x2700 @string/pref_camera_picturesize_entry_3600x2700 9.5M
3672x2754 @string/pref_camera_picturesize_entry_3672x2754 10M
4096x3072 @string/pref_camera_picturesize_entry_4096x3072 12M
4160x3120 @string/pref_camera_picturesize_entry_4160x3120 13M
4608x3456 @string/pref_camera_picturesize_entry_4608x3456 16M
5120x3840 @string/pref_camera_picturesize_entry_5120x3840 20M
       
vanzo增加 4352x3264 @string/pref_camera_picturesize_entry_4352x3264 14M
       
       
16:9
(如果手机屏幕比例是16:9,这像素就是全屏像素)
1280x720 @string/pref_camera_picturesize_entry_1280x720 1M
1600x912 @string/pref_camera_picturesize_entry_1280x960 1.3M
2048x1152 @string/pref_camera_picturesize_entry_2048x1536 3M
2560x1440 @string/pref_camera_picturesize_entry_2560x1440 4M
3328x1872 @string/pref_camera_picturesize_entry_3328x1872 6M
4096x2304 @string/pref_camera_picturesize_entry_3600x2700 9.5M
4608x2592 @string/pref_camera_picturesize_entry_4096x3072 12M
5120x2880 @string/pref_camera_picturesize_entry_5120x2880 15M
       
       
5:3
(如果手机屏幕比例是5:3,这像素就是全屏像素)
1280x768 @string/pref_camera_picturesize_entry_1280x768 1M
1600x960 @string/pref_camera_picturesize_entry_1600x1200 2M
2880x1728 @string/pref_camera_picturesize_entry_2592x1936 5M
3600x2160 @string/pref_camera_picturesize_entry_3264x2448 8M
       
       
3:2
(如果手机屏幕比例是3:2,这像素就是全屏像素)
1024x688 @string/pref_camera_picturesize_entry_1024x768 1M
1440x960 @string/pref_camera_picturesize_entry_1280x960 1.3M
2048x1360 @string/pref_camera_picturesize_entry_2048x1536 3M
2560x1712 @string/pref_camera_picturesize_entry_2592x1936 5M
       
备注 以上是92新平台本身支持的像素,MTK更新到Camera源码中的。
如有特殊差值需求,只要摄像头物理像素支持,或差值后支持,也可满足,但是要满足以下像素条件:(假设宽为w,高为h,想要个18M的像素)
1.w,h都是16的倍数
2.w:h = 4:3(或16:9,根据需求定)
3.w*h = 18M(根据需求定)
满足以上条件的w,h就可以做差值
另外:差值最好在以下范围内:VGA->2M(或3M),2M->5M,5M->8M,8M->12M,12M->18M(再大还没遇到过

 

像素值
相机所说的像素,其实是最大像素的意思,像素是分辨率的单位,这个像素值仅仅是相机所支持的有效最大分辨率。
30万 640×480
50万 800×600
80万 1024×768 5” (3.5×5英寸)
130万 1280×960 6” (4×6英寸)
200万 1600×1200 8”(6×8英寸) 5”(3.5×5英寸)
310万 2048×1536 10”(8×10寸) 7”(5×7英寸)
430万 2400×1800 12”(10×12英寸) 8”(6×8英寸)
500万 2560×1920 12”(10×12英寸) 8”(6×8英寸)
600万 3000×2000 14”(11×14英寸) 10”(8×10寸)
800万 3264×2488 16”(12×16英寸) 10”(8×10寸)
1100万 4080×2720 20”(16×20英寸) 12”(10×12英寸)
1400万 4536×3024 24”(18×24英寸) 14”(11×14英寸)

 


[FAQ05829] 6589 JB2如何实现camera插值或新增picture size    Download
Platform:MT6589
Branch:JB2
FAQ Content

[DESCRIPTION]
camera实现插值,该solution同时适用于新增一个picture size.

[SOLUTION]

Camera插值在底层已经做好,我们只需要在中间层和app层添加一个对应的picture size即可。但是有一些限制条件需要注意:

1.    插值的倍数只能小于等于16倍,也就是说假如是1M的sensor,那最多只能插值到16M;

2.    插值后的width和height都不能超过8192,也就是picture size设置的width和height的大小都不能超过8192;

3.    若插值的大小超过12M:

例如插值到18M,并且贵司code base版本在”

 

 

 

 

 

 

 

 

 

 

 

ALPS.JB2.MP.V1.2”之前(包括ALPS.JB2.MP.V1.2)的版本则需要申请并打上patch(ALPS00460866),若code base版本在ALPS.JB2.MP.V1.3之后则不需要;

 

4.    由于hardware jpeg encoder的限制,插值时设置的width和height请您分别都设为16的整数倍,若设置非16整数倍的width或height,则可能导致拍出来的图片会有异常(如图片扭曲、花屏、连拍的图片绿屏)。

 

 

 

下面是关于插值的方法:

 

(一)中间层修改

 

1.mediatek\custom\\hal\imgsensor\\config.ftbl..h    

 

(若没有该文件,则修改

 

mediatek\custom\\hal\imgsensor\src\config.ftbl.common_raw.h

 

或者config.ftbl.common_yuv.h

 

 

在如下定义picture size的地方增加您想要的size (宽和高必须是16的整数倍,宽高比例建议先用4:3的验证测试),如果已经包含您要加的size,就不需要再增加。

 

 

 

#if 1

 

//  Picture Size

 

FTABLE_CONFIG_AS_TYPE_OF_DEFAULT_VALUES(

 

KEY_AS_(MtkCameraParameters::KEY_PICTURE_SIZE),

 

SCENE_AS_DEFAULT_SCENE(

 

ITEM_AS_DEFAULT_("2560x1920"),

 

ITEM_AS_VALUES_(

 

"320x240",      "640x480",      "1024x768",     "1280x720",     "1280x768",     "1280x960"

 

)

 

),

 

)

 

#endif

 

 

 

例如:

 

//  Picture Size

 

FTABLE_CONFIG_AS_TYPE_OF_DEFAULT_VALUES(

 

KEY_AS_(MtkCameraParameters::KEY_PICTURE_SIZE),

 

SCENE_AS_DEFAULT_SCENE(

 

ITEM_AS_DEFAULT_("2560x1920"),

 

ITEM_AS_VALUES_(

 

"320x240",      "640x480",      "1024x768",     "1280x720",     "1280x768",     "1280x960", "4096x3072"

 

)

 

),

 

)

 

#endif

 

 

 

(二) app层的修改可以按照如下来修改:

 

1.\packages\apps\Camera\res\values\strings.xml

 

增加您想要的size,如果已经包含您要加的size,就不需要再增加

 

 

 

8M pixels

 

5M pixels

 

3M pixels

 

2M pixels

 

1.3M pixels

 

1M pixels

 

VGA

 

QVGA

 

 

 

例如:

 

12M Pixels

 

8M pixels

 

5M pixels

 

3M pixels

 

2M pixels

 

1.3M pixels

 

1M pixels

 

VGA

 

QVGA

 

 

 

2.\packages\apps\Camera\res\values\arrays.xml

 

 

 

@string/pref_camera_picturesize_entry_3264x2448

 

@string/pref_camera_picturesize_entry_2592x1936

 

@string/pref_camera_picturesize_entry_2592x1936

 

@string/pref_camera_picturesize_entry_2592x1936

 

@string/pref_camera_picturesize_entry_2048x1536

 

@string/pref_camera_picturesize_entry_1600x1200

 

@string/pref_camera_picturesize_entry_1280x960

 

@string/pref_camera_picturesize_entry_1024x768

 

@string/pref_camera_picturesize_entry_640x480

 

@string/pref_camera_picturesize_entry_320x240

 

 

 

 

增加您想要的size,如果已经包含您要加的size,就不需要再增加

 

例如:

 

 

 

@string/pref_camera_picturesize_entry_4096x3072

 

@string/pref_camera_picturesize_entry_3264x2448

 

@string/pref_camera_picturesize_entry_2592x1936

 

@string/pref_camera_picturesize_entry_2592x1936

 

@string/pref_camera_picturesize_entry_2592x1936

 

@string/pref_camera_picturesize_entry_2048x1536

 

@string/pref_camera_picturesize_entry_1600x1200

 

@string/pref_camera_picturesize_entry_1280x960

 

@string/pref_camera_picturesize_entry_1024x768

 

@string/pref_camera_picturesize_entry_640x480

 

@string/pref_camera_picturesize_entry_320x240

 

 

 

 

3.\packages\apps\Camera\res\values\arrays.xml 

 

 

3264x2448

 

2592x1944

 

2592x1936

 

2560x1920

 

2048x1536

 

1600x1200

 

1280x960

 

1024x768

 

640x480

 

320x240

 

 

 

 

增加您想要的size,如果已经包含你要加的size,就不需要再增加

 

例如:

 

 

4096x3072

 

3264x2448

 

2592x1944

 

2592x1936

 

2560x1920

 

2048x1536

 

1600x1200

 

1280x960

 

1024x768

 

640x480

 

320x240

 

 

 

 

4.\packages\apps\Camera\src\com\Android\Camera\CameraSettings.java

 

public static final String[] PICTURE_SIZE_4_3 = new String[] {

 

"320x240",

 

"640x480",

 

"1024x768",

 

"1280x960",

 

"1600x1200",

 

"2048x1536",

 

"2560x1920",

 

"3264x2448",

 

};

 

增加您想要的size,如果已经包含你要加的size,就不需要再增加

 

例如:

 

public static final String[] PICTURE_SIZE_4_3 = new String[] {

 

"320x240",

 

"640x480",

 

"1024x768",

 

"1280x960",

 

"1600x1200",

 

"2048x1536",

 

"2560x1920",

 

"3264x2448",

 

"4096x3072",

 

};

你可能感兴趣的:(移动开发)