mirror of
https://github.com/hardkernel/kernel_common_drivers.git
synced 2026-06-25 12:03:48 +09:00
video_composer: support mirror rotation for camera [1/1]
PD#SWPL-119111 Problem: need support mirror rotation for camera. Solution: support mirror rotation for camera. Verify: T7C Change-Id: Ic39b4acc1cb0ed285066e1a2befc0b227aa7d065 Signed-off-by: chen.xu <chen.xu@amlogic.com>
This commit is contained in:
committed by
gerrit autosubmit
parent
6bc8a05451
commit
cc021e4f77
@@ -55,7 +55,7 @@ static int get_dewarp_rotation_value(int vc_transform)
|
||||
{
|
||||
int rotate_value = 0;
|
||||
|
||||
if (vc_transform == 4)
|
||||
if (vc_transform == 4 || vc_transform == 5 || vc_transform == 6)
|
||||
rotate_value = 270;
|
||||
else if (vc_transform == 3)
|
||||
rotate_value = 180;
|
||||
|
||||
@@ -236,7 +236,7 @@ static enum ge2d_angle_type config_ge2d_rotation(int vf_transform)
|
||||
ge2d_angle = GE2D_ANGLE_TYPE_FLIP_H;
|
||||
else if (vf_transform == 2)
|
||||
ge2d_angle = GE2D_ANGLE_TYPE_FLIP_V;
|
||||
else if (vf_transform == 4)
|
||||
else if (vf_transform == 4 || vf_transform == 5 || vf_transform == 6)
|
||||
ge2d_angle = GE2D_ANGLE_TYPE_ROT_90;
|
||||
else if (vf_transform == 3)
|
||||
ge2d_angle = GE2D_ANGLE_TYPE_ROT_180;
|
||||
|
||||
@@ -1861,7 +1861,7 @@ static void vframe_do_mosaic_22(struct composer_dev *dev)
|
||||
vc_print(dev->index, PRINT_ERROR, "%s dma buffer not vf\n", __func__);
|
||||
}
|
||||
if (!scr_vf) {
|
||||
vc_print(dev->index, PRINT_ERROR, "%s:no vf\n", __func__);
|
||||
vc_print(dev->index, PRINT_ERROR, "%s:no vf\n", __func__);
|
||||
return;
|
||||
}
|
||||
vc_private->mosaic_src_vf[i] = scr_vf;
|
||||
@@ -2431,6 +2431,11 @@ static void vframe_composer(struct composer_dev *dev)
|
||||
if (is_fixtunnel)
|
||||
dst_vf->flag |= VFRAME_FLAG_FIX_TUNNEL;
|
||||
|
||||
if (vframe_info_cur->transform == VC_TRANSFORM_FLIP_H_ROT_90)
|
||||
dst_vf->flag |= VFRAME_FLAG_MIRROR_H;
|
||||
if (vframe_info_cur->transform == VC_TRANSFORM_FLIP_V_ROT_90)
|
||||
dst_vf->flag |= VFRAME_FLAG_MIRROR_V;
|
||||
|
||||
if (debug_axis_pip) {
|
||||
dst_vf->axis[0] = 0;
|
||||
dst_vf->axis[1] = 0;
|
||||
@@ -2822,7 +2827,9 @@ static void video_composer_task(struct composer_dev *dev)
|
||||
received_frames->frames_info.frame_info[0].transform;
|
||||
if (frame_transform == VC_TRANSFORM_ROT_90 ||
|
||||
frame_transform == VC_TRANSFORM_ROT_180 ||
|
||||
frame_transform == VC_TRANSFORM_ROT_270) {
|
||||
frame_transform == VC_TRANSFORM_ROT_270 ||
|
||||
frame_transform == VC_TRANSFORM_FLIP_H_ROT_90 ||
|
||||
frame_transform == VC_TRANSFORM_FLIP_V_ROT_90) {
|
||||
need_composer = true;
|
||||
dev->need_rotate = true;
|
||||
}
|
||||
@@ -3420,7 +3427,6 @@ static void set_frames_info(struct composer_dev *dev,
|
||||
struct timeval time1;
|
||||
struct timeval time2;
|
||||
u64 time_us64;
|
||||
u64 time_vsync = 0;
|
||||
int axis[4];
|
||||
int ready_len = 0;
|
||||
bool current_is_sideband = false;
|
||||
@@ -3564,14 +3570,14 @@ static void set_frames_info(struct composer_dev *dev,
|
||||
dev->received_frames[i].time_us64 = time_us64;
|
||||
|
||||
vc_print(dev->index, PRINT_PERFORMANCE,
|
||||
"len =%d,frame_count=%d,i=%d,z=%d,time_us64=%lld,fd=%d, time_vsync=%lld\n",
|
||||
"len =%d,frame_count=%d,i=%d,z=%d,time_us64=%lld,fd=%d, transform=%d\n",
|
||||
kfifo_len(&dev->receive_q),
|
||||
frames_info->frame_count,
|
||||
i,
|
||||
frames_info->disp_zorder,
|
||||
time_us64,
|
||||
fence_fd,
|
||||
time_vsync);
|
||||
frames_info->frame_info[0].transform);
|
||||
|
||||
for (j = 0; j < frames_info->frame_count; j++) {
|
||||
frames_info->frame_info[j].composer_fen_fd = fence_fd;
|
||||
|
||||
Reference in New Issue
Block a user