MTK平台设置不同的预览Size

news/2024/12/2 16:41:50/

这边文章记录的是1280x800=1.6屏幕分辨率预览窗口大小,sensor预览实际出图为4656x3496。

(1)App设置不同的预览Size的Log分析

(A)预览Size=960x720=1.333(Surface窗口设置为4:3)——Hal层会进行resize成1280x976

//config
mtkcam-dev3-hidl: [0-hidl-session::configureStreams_3_6] +
mtkcam-dev3-hidl: [0-hidl-session::convertStreamConfigurationFromHidl] {.v3_2 = {.id = 0, .streamType = OUTPUT, .width = 960, .height = 720, .format = IMPLEMENTATION_DEFINED, .usage = CPU_READ_NEVER | CPU_WRITE_NEVER | GPU_TEXTURE (0x100), .dataSpace = UNKNOWN | STANDARD_UNSPECIFIED | TRANSFER_UNSPECIFIED | RANGE_UNSPECIFIED (0), .rotation = ROTATION_0}, .physicalCameraId = "", .bufferSize = 0}
mtkcam-dev3-hidl: [0-hidl-session::convertStreamConfigurationFromHidl] {.v3_2 = {.id = 1, .streamType = OUTPUT, .width = 4608, .height = 3456, .format = BLOB, .usage = CPU_READ_NEVER | CPU_READ_RARELY | CPU_READ_OFTEN | CPU_WRITE_NEVER (0x3), .dataSpace = UNKNOWN | STANDARD_UNSPECIFIED | STANDARD_BT601_625 | TRANSFER_UNSPECIFIED | TRANSFER_LINEAR | TRANSFER_SRGB | TRANSFER_SMPTE_170M | RANGE_UNSPECIFIED | RANGE_FULL | V0_JFIF (0x8c20000), .rotation = ROTATION_0}, .physicalCameraId = "", .bufferSize = 24346616}
mtkcam-dev3-hidl: [0-hidl-session::convertStreamConfigurationFromHidl] {.v3_2 = {.id = 2, .streamType = OUTPUT, .width = 192, .height = 144, .format = YCBCR_420_888, .usage = CPU_READ_NEVER | CPU_READ_RARELY | CPU_READ_OFTEN | CPU_WRITE_NEVER (0x3), .dataSpace = UNKNOWN | STANDARD_UNSPECIFIED | STANDARD_BT601_625 | TRANSFER_UNSPECIFIED | TRANSFER_LINEAR | TRANSFER_SRGB | TRANSFER_SMPTE_170M | RANGE_UNSPECIFIED | RANGE_FULL | V0_JFIF (0x8c20000), .rotation = ROTATION_0}, .physicalCameraId = "", .bufferSize = 0}
mtkcam-dev3-hidl: [0-hidl-session::convertStreamConfigurationFromHidl] operationMode=0
mtkcam-dev3-hidl: [0-hidl-session::convertStreamConfigurationFromHidl] streamId:0 type:OUT (w,h) = (960,720) format:34 usage:0x100 dataSpace:0 rotation:0 physicalCameraId: bufferSize:0
mtkcam-dev3-hidl: [0-hidl-session::convertStreamConfigurationFromHidl] streamId:1 type:OUT (w,h) = (4608,3456) format:33 usage:0x3 dataSpace:8c20000 rotation:0 physicalCameraId: bufferSize:1737ff8
mtkcam-dev3-hidl: [0-hidl-session::convertStreamConfigurationFromHidl] streamId:2 type:OUT (w,h) = (192,144) format:35 usage:0x3 dataSpace:8c20000 rotation:0 physicalCameraId: bufferSize:0//预览窗口
CamAp_PreviewManager: updatePreviewSize: new size (960 , 720 ) current size (0 , 0 )
CamAp_PreviewTextureView: previewWidth = 800, previewHeight = 1066, mAspectRatio = 1.3333333333333333//P1HwPolicy
mtkcam-P1HwSettingPolicy: [configP1HwSetting] max_rrzo_size: target size(2560x1922)
mtkcam-P1HwSettingPolicy: [configP1HwSetting] maxYuvStreamSize is too small(960x720)
mtkcam-P1HwSettingPolicy: [configP1HwSetting] maxYuvStreamSize set rrzo to 1280x960
mtkcam-P1HwSettingPolicy: [configP1HwSetting] sensor size: target size(4656x3496)
mtkcam-P1HwSettingPolicy: [configP1HwSetting] target rrzo stream: target size(1280x961)
mtkcam-P1HwSettingPolicy: [configP1HwSetting] eis lower bound limitation: target size(1280x962)
mtkcam-P1HwSettingPolicy: [configP1HwSetting] preview upper bound limitation: target size(1280x962)
mtkcam-P1HwSettingPolicy: [configP1HwSetting] rrzo size(1280x962)
mtkcam-P1HwSettingPolicy: [configP1HwSetting] sensor size upper bound limitation: target size(1280x976)
mtkcam-P1HwSettingPolicy: aligned rrzo size(1280x976)//Hal resize
mtkcam-P1HwSettingPolicy: [queryRecommendResizeMaxRatio] Resize-Ratio-Percentage 25 for isp quality
MtkCam/HwInfoHelper: [querySupportResizeRatio] Support Resize-Ratio-Percentage: 25
MtkCam/HwInfoHelper: [alignRrzoHwLimitation] exceeding sensor size, modified size: 1280x976, original target size: 1280x976, crop size: 4656x3496
MtkCam/HwInfoHelper: [alignPass1HwLimitation] rrzo size 1280x976, stride 2400//P1Node
MtkCam/P1NodeImp: [setupAction] [Cam::0 R5 S5 E5 D2 O2 #1] [P1::ENQ][Num Q:5 M:5 F:4 R:4 @3][Type:1 Out:x15 Rec:x0 Raw:1 Cap:0 Exe:1 Flush:x0] [Exp:3068000ns] [MetaCtrl][SCALER_CROP(1) (0,0_4656x3496) ][SENSOR_CROP(0)][RESIZER_SET(0)]
MtkCam/P1NodeImp: [releaseAction] [Cam::0 R6 S6 E5 D3 O2 #1] [P1::DEQ][Num Q:3 M:3 F:2 R:2 @0][Type:1 Out:x15 Rec:x0 Raw:1 Cap:0 Exe:3 Flush:x0] job(0/1) IMG(pure) RRZ0(0-0-4656x3496)(0-0-1280x976)(1280x976) T-ns(EXP: 0)(Src:0)(SOF: m_1078259426000 b_22763963455000)(SS: 1078259426000) ExpExtend(0, 0)Q(SensorTs:1078

(B)预览Size=1600x1200=1.333(Surface窗口设置为4:3)——Hal层会进行resize成1600x1216

//config
10-27 06:09:30.267   940   940 D mtkcam-dev3-hidl: [0-hidl-session::configureStreams_3_6] +
10-27 06:09:30.267   940   940 D mtkcam-dev3-hidl: [0-hidl-session::convertStreamConfigurationFromHidl] {.v3_2 = {.id = 0, .streamType = OUTPUT, .width = 1600, .height = 1200, .format = IMPLEMENTATION_DEFINED, .usage = CPU_READ_NEVER | CPU_WRITE_NEVER | GPU_TEXTURE (0x100), .dataSpace = UNKNOWN | STANDARD_UNSPECIFIED | TRANSFER_UNSPECIFIED | RANGE_UNSPECIFIED (0), .rotation = ROTATION_0}, .physicalCameraId = "", .bufferSize = 0}
10-27 06:09:30.267   940   940 D mtkcam-dev3-hidl: [0-hidl-session::convertStreamConfigurationFromHidl] {.v3_2 = {.id = 1, .streamType = OUTPUT, .width = 4608, .height = 3456, .format = BLOB, .usage = CPU_READ_NEVER | CPU_READ_RARELY | CPU_READ_OFTEN | CPU_WRITE_NEVER (0x3), .dataSpace = UNKNOWN | STANDARD_UNSPECIFIED | STANDARD_BT601_625 | TRANSFER_UNSPECIFIED | TRANSFER_LINEAR | TRANSFER_SRGB | TRANSFER_SMPTE_170M | RANGE_UNSPECIFIED | RANGE_FULL | V0_JFIF (0x8c20000), .rotation = ROTATION_0}, .physicalCameraId = "", .bufferSize = 24346616}
10-27 06:09:30.267   940   940 D mtkcam-dev3-hidl: [0-hidl-session::convertStreamConfigurationFromHidl] {.v3_2 = {.id = 2, .streamType = OUTPUT, .width = 192, .height = 144, .format = YCBCR_420_888, .usage = CPU_READ_NEVER | CPU_READ_RARELY | CPU_READ_OFTEN | CPU_WRITE_NEVER (0x3), .dataSpace = UNKNOWN | STANDARD_UNSPECIFIED | STANDARD_BT601_625 | TRANSFER_UNSPECIFIED | TRANSFER_LINEAR | TRANSFER_SRGB | TRANSFER_SMPTE_170M | RANGE_UNSPECIFIED | RANGE_FULL | V0_JFIF (0x8c20000), .rotation = ROTATION_0}, .physicalCameraId = "", .bufferSize = 0}
10-27 06:09:30.267   940   940 D mtkcam-dev3-hidl: [0-hidl-session::convertStreamConfigurationFromHidl] operationMode=0
10-27 06:09:30.267   940   940 D mtkcam-dev3-hidl: [0-hidl-session::convertStreamConfigurationFromHidl] streamId:0 type:OUT (w,h) = (1600,1200) format:34 usage:0x100 dataSpace:0 rotation:0 physicalCameraId: bufferSize:0
10-27 06:09:30.267   940   940 D mtkcam-dev3-hidl: [0-hidl-session::convertStreamConfigurationFromHidl] streamId:1 type:OUT (w,h) = (4608,3456) format:33 usage:0x3 dataSpace:8c20000 rotation:0 physicalCameraId: bufferSize:1737ff8
10-27 06:09:30.267   940   940 D mtkcam-dev3-hidl: [0-hidl-session::convertStreamConfigurationFromHidl] streamId:2 type:OUT (w,h) = (192,144) format:35 usage:0x3 dataSpace:8c20000 rotation:0 physicalCameraId: bufferSize:0//预览窗口
CamAp_PreviewManager: updatePreviewSize: new size (1600 , 1200 ) current size (0 , 0 )
CamAp_PreviewTextureView: previewWidth = 800, previewHeight = 1066, mAspectRatio = 1.3333333333333333//P1HwPolicy
mtkcam-P1HwSettingPolicy: [configP1HwSetting] max_rrzo_size: target size(2560x1922)
mtkcam-P1HwSettingPolicy: [configP1HwSetting] sensor size: target size(4656x3496)
mtkcam-P1HwSettingPolicy: [configP1HwSetting] target rrzo stream: target size(1600x1201)
mtkcam-P1HwSettingPolicy: [configP1HwSetting] eis lower bound limitation: target size(1600x1202)
mtkcam-P1HwSettingPolicy: [configP1HwSetting] preview upper bound limitation: target size(1600x1202)
mtkcam-P1HwSettingPolicy: [configP1HwSetting] rrzo size(1600x1202)
mtkcam-P1HwSettingPolicy: [configP1HwSetting] sensor size upper bound limitation: target size(1600x1216)
mtkcam-P1HwSettingPolicy: aligned rrzo size(1600x1216)//Hal resize
mtkcam-P1HwSettingPolicy: [queryRecommendResizeMaxRatio] Resize-Ratio-Percentage 25 for isp quality
MtkCam/HwInfoHelper: [querySupportResizeRatio] Support Resize-Ratio-Percentage: 25
MtkCam/HwInfoHelper: [alignRrzoHwLimitation] exceeding sensor size, modified size: 1600x1216, original target size: 1600x1216, crop size: 4656x3496
MtkCam/HwInfoHelper: [alignPass1HwLimitation] rrzo size 1600x1216, stride 3008//P1Node
MtkCam/P1NodeImp: [setupAction] [Cam::0 R5 S5 E5 D2 O2 #1] [P1::ENQ][Num Q:5 M:5 F:4 R:4 @3][Type:1 Out:x15 Rec:x0 Raw:1 Cap:0 Exe:1 Flush:x0] [Exp:49995000ns] [MetaCtrl][SCALER_CROP(1) (0,0_4656x3496) ][SENSOR_CROP(0)][RESIZER_SET(0)]
MtkCam/P1NodeImp: [releaseAction] [Cam::0 R6 S6 E5 D3 O2 #1] [P1::DEQ][Num Q:3 M:3 F:2 R:2 @0][Type:1 Out:x15 Rec:x0 Raw:1 Cap:0 Exe:3 Flush:x0] job(0/1) IMG(pure) RRZ0(0-0-4656x3496)(0-0-1600x1216)(1600x1216) T-ns(EXP: 0)(Src:0)(SOF: m_1673252407000 b_23358956441000)(SS: 1673252407000) ExpExtend(0, 0)Q(SensorTs:16

(C)预览Size=1280x798=1.604(Surface窗口设置为4:3)——Hal层会进行resize成1280x976

//config
11-23 17:17:33.012   946  1133 D mtkcam-dev3-hidl: [0-hidl-session::configureStreams_3_6] +
11-23 17:17:33.012   946  1133 D mtkcam-dev3-hidl: [0-hidl-session::convertStreamConfigurationFromHidl] {.v3_2 = {.id = 0, .streamType = OUTPUT, .width = 1280, .height = 798, .format = IMPLEMENTATION_DEFINED, .usage = CPU_READ_NEVER | CPU_WRITE_NEVER | GPU_TEXTURE (0x100), .dataSpace = UNKNOWN | STANDARD_UNSPECIFIED | TRANSFER_UNSPECIFIED | RANGE_UNSPECIFIED (0), .rotation = ROTATION_0}, .physicalCameraId = "", .bufferSize = 0}
11-23 17:17:33.012   946  1133 D mtkcam-dev3-hidl: [0-hidl-session::convertStreamConfigurationFromHidl] {.v3_2 = {.id = 1, .streamType = OUTPUT, .width = 4608, .height = 3456, .format = BLOB, .usage = CPU_READ_NEVER | CPU_READ_RARELY | CPU_READ_OFTEN | CPU_WRITE_NEVER (0x3), .dataSpace = UNKNOWN | STANDARD_UNSPECIFIED | STANDARD_BT601_625 | TRANSFER_UNSPECIFIED | TRANSFER_LINEAR | TRANSFER_SRGB | TRANSFER_SMPTE_170M | RANGE_UNSPECIFIED | RANGE_FULL | V0_JFIF (0x8c20000), .rotation = ROTATION_0}, .physicalCameraId = "", .bufferSize = 24346616}
11-23 17:17:33.012   946  1133 D mtkcam-dev3-hidl: [0-hidl-session::convertStreamConfigurationFromHidl] {.v3_2 = {.id = 2, .streamType = OUTPUT, .width = 192, .height = 144, .format = YCBCR_420_888, .usage = CPU_READ_NEVER | CPU_READ_RARELY | CPU_READ_OFTEN | CPU_WRITE_NEVER (0x3), .dataSpace = UNKNOWN | STANDARD_UNSPECIFIED | STANDARD_BT601_625 | TRANSFER_UNSPECIFIED | TRANSFER_LINEAR | TRANSFER_SRGB | TRANSFER_SMPTE_170M | RANGE_UNSPECIFIED | RANGE_FULL | V0_JFIF (0x8c20000), .rotation = ROTATION_0}, .physicalCameraId = "", .bufferSize = 0}
11-23 17:17:33.012   946  1133 D mtkcam-dev3-hidl: [0-hidl-session::convertStreamConfigurationFromHidl] operationMode=0
11-23 17:17:33.012   946  1133 D mtkcam-dev3-hidl: [0-hidl-session::convertStreamConfigurationFromHidl] streamId:0 type:OUT (w,h) = (1280,798) format:34 usage:0x100 dataSpace:0 rotation:0 physicalCameraId: bufferSize:0
11-23 17:17:33.012   946  1133 D mtkcam-dev3-hidl: [0-hidl-session::convertStreamConfigurationFromHidl] streamId:1 type:OUT (w,h) = (4608,3456) format:33 usage:0x3 dataSpace:8c20000 rotation:0 physicalCameraId: bufferSize:1737ff8
11-23 17:17:33.012   946  1133 D mtkcam-dev3-hidl: [0-hidl-session::convertStreamConfigurationFromHidl] streamId:2 type:OUT (w,h) = (192,144) format:35 usage:0x3 dataSpace:8c20000 rotation:0 physicalCameraId: bufferSize:0//预览窗口
CamAp_PreviewManager: updatePreviewSize: new size (1280 , 798 ) current size (0 , 0 )
CamAp_PreviewTextureView: previewWidth = 800, previewHeight = 1066, mAspectRatio = 1.3333333333333333//P1HwPolicy
mtkcam-P1HwSettingPolicy: [configP1HwSetting] max_rrzo_size: target size(2560x1922)
mtkcam-P1HwSettingPolicy: [configP1HwSetting] sensor size: target size(4656x3496)
mtkcam-P1HwSettingPolicy: [configP1HwSetting] target rrzo stream: target size(1280x961)
mtkcam-P1HwSettingPolicy: [configP1HwSetting] eis lower bound limitation: target size(1280x962)
mtkcam-P1HwSettingPolicy: [configP1HwSetting] preview upper bound limitation: target size(1280x962)
mtkcam-P1HwSettingPolicy: [configP1HwSetting] rrzo size(1280x962)
mtkcam-P1HwSettingPolicy: [configP1HwSetting] sensor size upper bound limitation: target size(1280x976)
mtkcam-P1HwSettingPolicy: aligned rrzo size(1280x976)//Hal resize
mtkcam-P1HwSettingPolicy: [queryRecommendResizeMaxRatio] Resize-Ratio-Percentage 25 for isp quality
MtkCam/HwInfoHelper: [querySupportResizeRatio] Support Resize-Ratio-Percentage: 25
MtkCam/HwInfoHelper: [alignRrzoHwLimitation] exceeding sensor size, modified size: 1280x976, original target size: 1280x976, crop size: 4656x3496
MtkCam/HwInfoHelper: [alignPass1HwLimitation] rrzo size 1280x976, stride 2400//P1Node
MtkCam/P1NodeImp: [setupAction] [Cam::0 R5 S5 E5 D2 O2 #1] [P1::ENQ][Num Q:5 M:5 F:4 R:4 @3][Type:1 Out:x15 Rec:x0 Raw:1 Cap:0 Exe:1 Flush:x0] [Exp:33333000ns] [MetaCtrl][SCALER_CROP(1) (0,0_4656x3496) ][SENSOR_CROP(0)][RESIZER_SET(0)]
MtkCam/P1NodeImp: [releaseAction] [Cam::0 R6 S6 E5 D3 O2 #1] [P1::DEQ][Num Q:3 M:3 F:2 R:2 @0][Type:1 Out:x15 Rec:x0 Raw:1 Cap:0 Exe:3 Flush:x0] job(0/1) IMG(pure) RRZ0(0-0-4656x3496)(0-0-1280x976)(1280x976) T-ns(EXP: 0)(Src:0)(SOF: m_1150300512000 b_1150300499000)(SS: 1150300512000) ExpExtend(0, 0)Q(SensorTs:11503

(2)MTK平台RrzoHwLimit限制

//vendor/mediatek/proprietary/hardware/mtkcam/utils/hw/HwInfoHelper.cppMBOOL
HwInfoHelper::
alignRrzoHwLimitation(MSize const targetSize,MSize const sensorSize,MSize& result,MUINT32 const recommendResizeRatio
) const
{return  mpImp->alignRrzoHwLimitation(targetSize, sensorSize, result, recommendResizeRatio);
}MBOOL
IMPL_CLASSNAME::
alignRrzoHwLimitation(MSize const targetSize,MSize const sensorSize,MSize& result,MUINT32 const recommendResizeRatio
) const
{MUINT32 SupportRatio = 40;bool scaledUp = false;result = targetSize;// figure out the crop region sizeMSize usedRegionSize;usedRegionSize.w = sensorSize.w;usedRegionSize.h = sensorSize.h;// check if the edges are beyond hardware scale limitation(crop region edge * scale ratio)// scale up to cope with the limitation, if neededquerySupportResizeRatio(SupportRatio);//这里可以调整SupportRatio,SupportRatio越大表示Hal对的Limit限制越宽松,Sensor Size进行Resize后的值也越大,画面越清晰int flag = property_get_int32("ro.boot.flag.device", 0);MY_LOGD("SupportRatio = %d, recommendResizeRatio = %d, ctsFlag = %d", SupportRatio,recommendResizeRatio,flag);if(flag == 0){SupportRatio = 60;}else{if (recommendResizeRatio > SupportRatio) {MY_LOGD("Modify resize ratio (%u) to (%u) for isp quality", SupportRatio, recommendResizeRatio);SupportRatio = recommendResizeRatio;}}#define ROUND_UP(x, div) (((x) + (div - 1)) / div)
#define ALIGN16(x) x = (((x) + 15) & ~(15))// check the widthif( (uint32_t)result.w < ROUND_UP(usedRegionSize.w * SupportRatio, 100) ){result = MSize(ROUND_UP(usedRegionSize.w * SupportRatio, 100),result.h * ROUND_UP(usedRegionSize.w * SupportRatio, 100) / result.w);scaledUp = true;ALIGN16(result.w);ALIGN16(result.h);MY_LOGD("width is beyond scale limitation, modified size: %dx%d, original target size: %dx%d, crop size: %dx%d", result.w, result.h, targetSize.w, targetSize.h, usedRegionSize.w, usedRegionSize.h);}// check the heightif( (uint32_t)result.h < ROUND_UP(usedRegionSize.h * SupportRatio, 100) ){result = MSize(result.w * ROUND_UP(usedRegionSize.h * SupportRatio, 100) / result.h,ROUND_UP(usedRegionSize.h * SupportRatio, 100));scaledUp = true;ALIGN16(result.w);ALIGN16(result.h);MY_LOGD("height is beyond scale limitation, modified size: %dx%d, original target size: %dx%d, crop size: %dx%d", result.w, result.h, targetSize.w, targetSize.h, usedRegionSize.w, usedRegionSize.h);}if( !scaledUp ){// we don't attempt to scale down if scaledUp is true,// since it means at least one edge is at the limitMSize temp = result;if( temp.w > sensorSize.w ){temp = MSize(sensorSize.w,temp.h * sensorSize.w / temp.w);}if( temp.h > sensorSize.h ){temp = MSize(temp.w * sensorSize.h / temp.h,sensorSize.h);}if( (uint32_t)temp.w > usedRegionSize.w * SupportRatio / 100 && (uint32_t)temp.h > usedRegionSize.h * SupportRatio / 100 ){result = temp;MY_LOGD("exceeding sensor size, modified size: %dx%d, original target size: %dx%d, crop size: %dx%d", result.w, result.h, targetSize.w, targetSize.h, usedRegionSize.w, usedRegionSize.h);}}
#undef ROUND_UP
#undef ALIGN16return MTRUE;
}

同样的960x720的预览Size,会出现P1Node Resize后的值不一样,可查看如下Log:

//config
mtkcam-dev3-hidl: [0-hidl-session::configureStreams_3_6] +
mtkcam-dev3-hidl: [0-hidl-session::convertStreamConfigurationFromHidl] {.v3_2 = {.id = 0, .streamType = OUTPUT, .width = 960, .height = 720, .format = IMPLEMENTATION_DEFINED, .usage = CPU_READ_NEVER | CPU_WRITE_NEVER | GPU_TEXTURE (0x100), .dataSpace = UNKNOWN | STANDARD_UNSPECIFIED | TRANSFER_UNSPECIFIED | RANGE_UNSPECIFIED (0), .rotation = ROTATION_0}, .physicalCameraId = "", .bufferSize = 0}
mtkcam-dev3-hidl: [0-hidl-session::convertStreamConfigurationFromHidl] {.v3_2 = {.id = 1, .streamType = OUTPUT, .width = 4608, .height = 3456, .format = BLOB, .usage = CPU_READ_NEVER | CPU_READ_RARELY | CPU_READ_OFTEN | CPU_WRITE_NEVER (0x3), .dataSpace = UNKNOWN | STANDARD_UNSPECIFIED | STANDARD_BT601_625 | TRANSFER_UNSPECIFIED | TRANSFER_LINEAR | TRANSFER_SRGB | TRANSFER_SMPTE_170M | RANGE_UNSPECIFIED | RANGE_FULL | V0_JFIF (0x8c20000), .rotation = ROTATION_0}, .physicalCameraId = "", .bufferSize = 24346616}
mtkcam-dev3-hidl: [0-hidl-session::convertStreamConfigurationFromHidl] {.v3_2 = {.id = 2, .streamType = OUTPUT, .width = 192, .height = 144, .format = YCBCR_420_888, .usage = CPU_READ_NEVER | CPU_READ_RARELY | CPU_READ_OFTEN | CPU_WRITE_NEVER (0x3), .dataSpace = UNKNOWN | STANDARD_UNSPECIFIED | STANDARD_BT601_625 | TRANSFER_UNSPECIFIED | TRANSFER_LINEAR | TRANSFER_SRGB | TRANSFER_SMPTE_170M | RANGE_UNSPECIFIED | RANGE_FULL | V0_JFIF (0x8c20000), .rotation = ROTATION_0}, .physicalCameraId = "", .bufferSize = 0}
mtkcam-dev3-hidl: [0-hidl-session::convertStreamConfigurationFromHidl] operationMode=0
mtkcam-dev3-hidl: [0-hidl-session::convertStreamConfigurationFromHidl] streamId:0 type:OUT (w,h) = (960,720) format:34 usage:0x100 dataSpace:0 rotation:0 physicalCameraId: bufferSize:0
mtkcam-dev3-hidl: [0-hidl-session::convertStreamConfigurationFromHidl] streamId:1 type:OUT (w,h) = (4608,3456) format:33 usage:0x3 dataSpace:8c20000 rotation:0 physicalCameraId: bufferSize:1737ff8
mtkcam-dev3-hidl: [0-hidl-session::convertStreamConfigurationFromHidl] streamId:2 type:OUT (w,h) = (192,144) format:35 usage:0x3 dataSpace:8c20000 rotation:0 physicalCameraId: bufferSize:0//预览窗口
CamAp_PreviewManager: updatePreviewSize: new size (960 , 720 ) current size (0 , 0 )
CamAp_PreviewTextureView: previewWidth = 800, previewHeight = 1066, mAspectRatio = 1.3333333333333333//P1HwPolicy
mtkcam-P1HwSettingPolicy: [configP1HwSetting] max_rrzo_size: target size(2560x1922)
mtkcam-P1HwSettingPolicy: [configP1HwSetting] maxYuvStreamSize is too small(960x720)
mtkcam-P1HwSettingPolicy: [configP1HwSetting] maxYuvStreamSize set rrzo to 1280x960
mtkcam-P1HwSettingPolicy: [configP1HwSetting] sensor size: target size(4656x3496)
mtkcam-P1HwSettingPolicy: [configP1HwSetting] target rrzo stream: target size(1280x961)
mtkcam-P1HwSettingPolicy: [configP1HwSetting] eis lower bound limitation: target size(1280x962)
mtkcam-P1HwSettingPolicy: [configP1HwSetting] preview upper bound limitation: target size(1280x962)
mtkcam-P1HwSettingPolicy: [configP1HwSetting] rrzo size(1280x962)
mtkcam-P1HwSettingPolicy: [configP1HwSetting] sensor size upper bound limitation: target size(1280x976)
mtkcam-P1HwSettingPolicy: aligned rrzo size(1280x976)//Hal resize
mtkcam-P1HwSettingPolicy: [queryRecommendResizeMaxRatio] Resize-Ratio-Percentage 25 for isp quality
MtkCam/HwInfoHelper: [querySupportResizeRatio] Support Resize-Ratio-Percentage: 25
MtkCam/HwInfoHelper: [alignRrzoHwLimitation] SupportRatio = 25, recommendResizeRatio = 25, flag = 0
//这里的SupportRatio被设置成60(SupportRatio=60)
MtkCam/HwInfoHelper: [alignRrzoHwLimitation] width is beyond scale limitation, modified size: 2800x2144, original target size: 1280x976, crop size: 4656x3496
MtkCam/HwInfoHelper: [alignPass1HwLimitation] rrzo size 2800x2144, stride 5264//P1Node
MtkCam/P1NodeImp: [setupAction] [Cam::0 R5 S5 E5 D1 O1 #1] [P1::ENQ][Num Q:5 M:5 F:4 R:4 @3][Type:1 Out:x15 Rec:x0 Raw:1 Cap:0 Exe:1 Flush:x0] [Exp:12013000ns] [MetaCtrl][SCALER_CROP(1) (0,0_4656x3496) ][SENSOR_CROP(0)][RESIZER_SET(0)]
MtkCam/P1NodeImp: [releaseAction] [Cam::0 R6 S6 E5 D2 O1 #1] [P1::DEQ][Num Q:2 M:2 F:1 R:1 @0][Type:1 Out:x15 Rec:x0 Raw:1 Cap:0 Exe:3 Flush:x0] job(0/1) IMG(pure) RRZ0(0-0-4656x3496)(0-0-2800x2144)(2800x2144) T-ns(EXP: 0)(Src:0)(SOF: m_284036834000 b_284036828000)(SS: 284036834000) ExpExtend(0, 0)Q(SensorTs:284039

可以看到如上虽然App下的Preview Size为960x720,但是实际P1将Sensor Preview Size进行了Resize后为2800x2144,不在是之前的1280x976。


http://www.ppmy.cn/news/272685.html

相关文章

meg和bank_显卡和Pentium过热传奇终止...并且对ATI Radeon 256Meg 9800 Pro超频

meg和bank The Video Card 显卡 Well, Ive been an NVidia fan for years, and I really thought Id go for the new NVidia 6800 Ultra. Theyve got fantastically stable drivers, dual monitor support, and dual DVI support. However, its US$600 and Ive got a wife - …

多媒体/Display认知记录总结

OMX TUNNEL的一种工作模型: 1.对于每个解码器,都有一个码流使它无法工作,视频编码都是YUV420像素格式,硬件输出也只支持这几种格式。 2. 码流相当于光盘,video codec相当于播放器,从数学的角度讲,它们是同构的的装置,这是一种新的解读。 3.编码与隐含的意义,有一种…

modetest工具测试(linux-5.10)

(102条消息) modetest编译、原理分析_空腹吃饭的博客-CSDN博客 (102条消息) tools:drm-kms调试手段[modetest]_drm_debug_kms_maze.ma的博客-CSDN博客 本内容通过modetest的打印&#xff0c;了解drm中各个object之间的关联&#xff0c;即如何正确的设置crtc&#xff0c;conne…

详解-自定义树莓派的显示分辨率

背景&#xff1a;树莓派一般可以自动检测目标设备的分辨率。但对于部分设备&#xff0c;尤其是HDMI-VGA转换器&#xff0c;分辨率可能会明显不对&#xff08;过大或过小&#xff09;。这时就需要给树莓派指定一个分辨率。 方法1&#xff1a;设置方法是在终端输入&#xff1a;s…

Mtk平台Camera新增差值(二)

之前介绍了一篇Mtk平台如何在Metadata当中来配置差值Mtk平台Camera新增差值&#xff08;1&#xff09;&#xff0c;实际功能是可以实现的&#xff0c;但是却无法通过CTS测试的&#xff0c;因为CTS测试会抓取sensor drv的最大输出能力和metadata的最大值来进行比较。 下面将介绍…

CVBS、VGA、HDMI、MIPI等8种视频接口详解

硬件接口&#xff08;hardware interface&#xff09;指的是两个硬件设备之间的连接方式。硬件接口既包括物理上的接口&#xff0c;还包括逻辑上的数据传送协议。 CVBSCVBS英文全称为Composite Video Broadcast Signal 或 Composite Video Blanking and Sync。中文翻译为复合视…

TC358775XBG是一颗将MIPI DSI信号转换成single/ dual -link LVDS的芯片,最高分辨率支持到1920x1200

产品特征&#xff1a; MIPI接口&#xff1a; &#xff08;1&#xff09;、支持1/2/3/4 lane(s) data&#xff0c;Maximum bit rate of 1 Gbps/lane &#xff08;2&#xff09;、支持video mode&#xff08;Non-burst Mode with Sync Pulses、Non-Burst Mode with Sync Events&a…

ubuntu9.10更改屏幕分辨率

此方法针对显示首选项的最大分辨率只有800*600的情况。 第一步&#xff1a;在终端中输入命令&#xff1a;cvt 1024 768 (“1024 768“是根据分辨率来写的&#xff0c;其它的分辨率有&#xff1a;600*480 、800*600 、1024*768、1400x1050、1600x1200、1280x720、1920x1080等&a…