Platform: RK3288
OS: Android 6.0
Kernel: 3.10.92
需求:
摄像头安装之后预览和预览回调画面是倒着的,需要旋转180°。
现象:
通过修改camera_board.xml中的参数
,发现只有预览画面正常,而预览回调数据还是倒过来的。
说明此参数只对预览有效。
代码改动:
diff --git a/Config/cam_board_rk3288.xml b/Config/cam_board_rk3288.xml
index d3ea5bc..279a9c7 100644
--- a/Config/cam_board_rk3288.xml
+++ b/Config/cam_board_rk3288.xml
@@ -21,7 +21,7 @@
<SensorFacing facing="back"></SensorFacing>
<SensorInterface mode="CCIR601"></SensorInterface>
<SensorMirrorFlip mirror="0"></SensorMirrorFlip>
- <SensorOrientation orientation="180"></SensorOrientation>
+ <SensorOrientation orientation="0"></SensorOrientation>
<SensorPowerupSequence seq="1234"></SensorPowerupSequence>
<SensorFovParemeter h="60.0" v="60.0"></SensorFovParemeter>
<SensorAWB_Frame_Skip fps="15"></SensorAWB_Frame_Skip>
diff --git a/SiliconImage/isi/drv/OV5640/source/OV5640_tables.c b/SiliconImage/isi/drv/OV5640/source/OV5640_tables.c
index a8e25f3..dfe58c4 100755
--- a/SiliconImage/isi/drv/OV5640/source/OV5640_tables.c
+++ b/SiliconImage/isi/drv/OV5640/source/OV5640_tables.c
@@ -71,7 +71,7 @@ const IsiRegDescription_t OV5640_g_aRegDescription[] =
{0x3c09, 0x1c,"",eReadWrite,},
{0x3c0a, 0x9c,"",eReadWrite,},
{0x3c0b, 0x40,"",eReadWrite,},
- {0x3820, 0x41,"",eReadWrite,},
+ {0x3820, 0x47,"",eReadWrite,},
{0x3821, 0x07,"",eReadWrite,},
{0x3814, 0x31,"",eReadWrite,},
{0x3815, 0x31,"",eReadWrite,},
@@ -300,7 +300,7 @@ const IsiRegDescription_t OV5640_g_aRegDescription[] =
{0x3503, 0x00,"",eReadWrite,},
{0x3c07, 0x08,"",eReadWrite,},
- {0x3820, 0x41,"",eReadWrite,},
+ {0x3820, 0x47,"",eReadWrite,},
{0x3821, 0x07,"",eReadWrite,},
{0x3814, 0x31,"",eReadWrite,},
{0x3815, 0x31,"",eReadWrite,},
@@ -351,7 +351,7 @@ const IsiRegDescription_t OV5640_g_svga[] =
{0x3503, 0x00,"",eReadWrite,},
{0x3a00, 0x7c,"",eReadWrite,},
{0x3c07, 0x08,"",eReadWrite,},
- {0x3820, 0x41,"",eReadWrite,},
+ {0x3820, 0x47,"",eReadWrite,},
{0x3821, 0x07,"",eReadWrite,},
{0x3814, 0x31,"",eReadWrite,},
{0x3815, 0x31,"",eReadWrite,},
@@ -411,7 +411,7 @@ const IsiRegDescription_t OV5640_g_video_720p[] =
{0x380f,0xe4,"",eReadWrite,},
{0x3813,0x04,"",eReadWrite,},
- {0x3820, 0x41,"",eReadWrite,}, //[email protected] add start: qsxvga -> 720p isn't stream on
+ {0x3820, 0x47,"",eReadWrite,}, //[email protected] add start: qsxvga -> 720p isn't stream on
{0x3821, 0x07,"",eReadWrite,},
{0x3814, 0x31,"",eReadWrite,},
{0x3815, 0x31,"",eReadWrite,},
@@ -449,45 +449,45 @@ const IsiRegDescription_t OV5640_g_video_720p[] =
};
const IsiRegDescription_t OV5640_g_2592x1944[] =
{
- {0x3820, 0x41,"",eReadWrite,},
+ {0x3820, 0x47,"",eReadWrite,},
参考:
理解 Android 相机预览方向和拍照方向