Camera Services: Difference between revisions
Jump to navigation
Jump to search
Steveice10 (talk | contribs) m Links. |
m Add anchors |
||
| (6 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
__TOC__ | |||
{{Anchor|CAMC}}{{Anchor|cam:c}} | |||
==cam:c (PORT_REG) == | ==cam:c (PORT_REG) == | ||
Same as [[#cam:u_.28PORT_USER.29|cam:u]] | |||
{{Anchor|CAMS}}{{Anchor|cam:s}} | |||
==cam:s (PORT_CAL) == | ==cam:s (PORT_CAL) == | ||
Same as [[#cam:u_.28PORT_USER.29|cam:u]] | |||
{{Anchor|CAMQ}}{{Anchor|cam:q}} | |||
==cam:q (PORT_QTM) == | ==cam:q (PORT_QTM) == | ||
This was added with New3DS. | This was added with New3DS. | ||
{| class="wikitable" border="1" | |||
|- | |||
! Command Header | |||
! Description | |||
|- | |||
| 0x00010040 | |||
| [[CAMU:StartCapture|StartCapture]] | |||
|- | |||
| 0x00020040 | |||
| [[CAMU:StopCapture|StopCapture]] | |||
|- | |||
| 0x0003004? | |||
| [[CAMU:IsBusy|IsBusy]] | |||
|- | |||
| 0x00040040 | |||
| [[CAMU:ClearBuffer|ClearBuffer]] | |||
|- | |||
| 0x0005004? | |||
| [[CAMU:GetVsyncInterruptEvent|GetVsyncInterruptEvent]] | |||
|- | |||
| 0x0006004? | |||
| [[CAMU:GetBufferErrorInterruptEvent|GetBufferErrorInterruptEvent]] | |||
|- | |||
| 0x0007???? | |||
| [[CAMU:StartRecieving|StartRecieving]] | |||
|- | |||
| 0x00080040 | |||
| [[CAMU:IsFinishedRecieving|IsFinishedRecieving]] | |||
|- | |||
| 0x00090100 | |||
| [[CAMU:SetTransferLines|SetTransferLines]] | |||
|- | |||
| 0x000A008? | |||
| [[CAMU:GetMaxLines|GetMaxLines]] | |||
|- | |||
| 0x000B0100 | |||
| [[CAMU:SetTransferBytes|SetTransferBytes]] | |||
|- | |||
| 0x000C004? | |||
| [[CAMU:GetTransferBytes|GetTransferBytes]] | |||
|- | |||
| 0x000D008? | |||
| [[CAMU:GetMaxBytes|GetMaxBytes]] | |||
|- | |||
| 0x000E0080 | |||
| [[CAMU:SetTrimming|SetTrimming]] | |||
|- | |||
| 0x000F004? | |||
| [[CAMU:IsTrimming|IsTrimming]] | |||
|- | |||
| 0x00100140 | |||
| [[CAMU:SetTrimmingParams|SetTrimmingParams]] | |||
|- | |||
| 0x0011???? | |||
| [[CAMU:GetTrimmingParams|GetTrimmingParams]] | |||
|- | |||
| 0x00120140 | |||
| [[CAMU:SetTrimmingParamsCenter|SetTrimmingParamsCenter]] | |||
|- | |||
| 0x00130040 | |||
| [[CAMU:Activate|Activate]] | |||
|- | |||
| 0x00140080 | |||
| [[CAMU:SwitchContext|SwitchContext]] | |||
|- | |||
| 0x00150080 | |||
| [[CAMU:SetExposure|SetExposure]] | |||
|- | |||
| 0x00160080 | |||
| [[CAMU:SetWhiteBalance|SetWhiteBalance]] | |||
|- | |||
| 0x00170080 | |||
| [[CAMU:SetSharpness|SetSharpness]] | |||
|- | |||
| 0x00180080 | |||
| [[CAMU:SetAutoExposure|SetAutoExposure]] | |||
|- | |||
| 0x0019004? | |||
| [[CAMU:IsAutoExposure|IsAutoExposure]] | |||
|- | |||
| 0x001A0080 | |||
| [[CAMU:SetAutoWhiteBalance|SetAutoWhiteBalance]] | |||
|- | |||
| 0x001B004? | |||
| [[CAMU:IsAutoWhiteBalance|IsAutoWhiteBalance]] | |||
|- | |||
| 0x001C00C0 | |||
| [[CAMU:FlipImage|FlipImage]] | |||
|- | |||
| 0x001D020? | |||
| [[CAMU:SetDetailSize|SetDetailSize]] | |||
|- | |||
| 0x001E00C0 | |||
| [[CAMU:SetSize|SetSize]] | |||
|- | |||
| 0x001F0080 | |||
| [[CAMU:SetFrameRate|SetFrameRate]] | |||
|- | |||
| 0x00200080 | |||
| [[CAMU:SetPhotoMode|SetPhotoMode]] | |||
|- | |||
| 0x002100C0 | |||
| [[CAMU:SetEffect|SetEffect]] | |||
|- | |||
| 0x00220080 | |||
| [[CAMU:SetContrast|SetContrast]] | |||
|- | |||
| 0x00230080 | |||
| [[CAMU:SetLensCorrection|SetLensCorrection]] | |||
|- | |||
| 0x002400C0 | |||
| [[CAMU:SetOutputFormat|SetOutputFormat]] | |||
|- | |||
| 0x0025014? | |||
| [[CAMU:SetAutoExposureWindow|SetAutoExposureWindow]] | |||
|- | |||
| 0x0026014? | |||
| [[CAMU:SetAutoWhiteBalanceWindow|SetAutoWhiteBalanceWindow]] | |||
|- | |||
| 0x00270080 | |||
| [[CAMU:SetNoiseFilter|SetNoiseFilter]] | |||
|- | |||
| 0x00280080 | |||
| [[CAMU:SyncronizeVsyncTiming|SyncronizeVsyncTiming]] | |||
|- | |||
| 0x0029???? | |||
| [[CAMU:GetLatestVsyncTiming|GetLatestVsyncTiming]] | |||
|- | |||
| 0x002A???? | |||
| [[CAMU:GetStereoCallibrationData|GetStereoCallibrationData]] | |||
|- | |||
| 0x002B???? | |||
| [[CAMU:SetPackageParameterWithoutContext|SetPackageParameterWithoutContext]] | |||
|- | |||
| 0x002C0080 | |||
| [[CAMU:SetPackageParameterWithContext|SetPackageParameterWithContext]] | |||
|- | |||
| 0x002D???? | |||
| [[CAMU:SetPackageParameterWithContextDetail|SetPackageParameterWithContextDetail]] | |||
|- | |||
| 0x002E??? | |||
| [[CAMU:GetSuitableY2RStandardCoeffecient|GetSuitableY2RStandardCoeffecient]] | |||
|- | |||
| 0x002F | |||
| [[CAMU:PlayShutterSoundWithWave|PlayShutterSoundWithWave]] | |||
|- | |||
| 0x0030???? | |||
| [[CAMU:PlayShutterSound|GetShutterSound]] | |||
|- | |||
| 0x0031000? | |||
| [[CAMU:DriverInitailize|DriverInitialize]] | |||
|- | |||
| 0x0032000? | |||
| [[CAMU:DriverFinalize|DriverFinalize]] | |||
|- | |||
| 0x0033000? | |||
| [[CAMU:GetActivatedCamera|GetActivatedCamera]] | |||
|- | |||
| 0x0034000? | |||
| [[CAMU:GetSleepCamera|GetSleepCamera]] | |||
|- | |||
| 0x00350040 | |||
| [[CAMU:SetSleepCamera|SetSleepCamera]] | |||
|- | |||
| 0x00360040 | |||
| [[CAMU:SetBrightnessSyncronization|SetBrightnessSyncronization]] | |||
|- | |||
| 0x0037004? | |||
| ??? | |||
|- | |||
| 0x0038000? | |||
| ??? | |||
|- | |||
| 0x0039004? | |||
| ??? | |||
|- | |||
| 0x003A0080 | |||
| ??? | |||
|- | |||
| 0x003B004? | |||
| ??? | |||
|- | |||
| 0x003C0080 | |||
| ??? | |||
|- | |||
| 0x003D000? | |||
| ??? | |||
|- | |||
| 0x003E0000 | |||
| ??? | |||
|} | |||
Most commands are same as cam:u, although, with different command headers since some commands which are available in cam:u do not exist in cam:q | |||
{{Anchor|CAMU}}{{Anchor|cam:u}} | |||
==cam:u (PORT_USER)== | ==cam:u (PORT_USER)== | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
| Line 197: | Line 398: | ||
| 0x003E0040 | | 0x003E0040 | ||
| [[CAMU:SetBrightnessSynchronization|SetBrightnessSynchronization]] | | [[CAMU:SetBrightnessSynchronization|SetBrightnessSynchronization]] | ||
|- | |||
| 0x003F0040 | |||
| Stubbed, always returns 0 | |||
|- | |||
| 0x004000C0 | |||
| ??? | |||
|- | |||
| 0x00410040 | |||
| Stubbed, returns D8A053EA if flag is not 1 | |||
|- | |||
| 0x00420040 | |||
| ??? | |||
|- | |||
| 0x00430000 | |||
| Stubbed, returns D8A053EA if flag is not 1 | |||
|- | |||
| 0x00440000 | |||
| Stubbed, returns D8A053EA if flag is not 1 | |||
|} | |} | ||
| Line 779: | Line 998: | ||
|} | |} | ||
{{Anchor|Y2R}}{{Anchor|Y2RU}}{{Anchor|y2r:u}} | |||
== y2r:u == | == y2r:u == | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
| Line 1,132: | Line 1,352: | ||
| alpha | | alpha | ||
|} | |} | ||
[[Category:Services]] | |||
Latest revision as of 09:09, 19 September 2024
cam:c (PORT_REG)
Same as cam:u
cam:s (PORT_CAL)
Same as cam:u
cam:q (PORT_QTM)
This was added with New3DS.
Most commands are same as cam:u, although, with different command headers since some commands which are available in cam:u do not exist in cam:q
cam:u (PORT_USER)
Port
| Enum | Value |
|---|---|
| PORT_NONE | 0x0 |
| PORT_CAM1 | 0x1 << 0x0 |
| PORT_CAM2 | 0x1 << 0x1 |
| PORT_BOTH | PORT_CAM1 | PORT_CAM2 |
CameraSelect
| Enum | Value |
|---|---|
| SELECT_NONE | 0x0 |
| SELECT_OUT1 | 0x1 << 0x0 |
| SELECT_IN1 | 0x1 << 0x1 |
| SELECT_OUT2 | 0x1 << 0x2 |
| SELECT_IN1_OUT1 | SELECT_OUT1 | SELECT_IN1 |
| SELECT_OUT1_OUT2 | SELECT_OUT1 | SELECT_OUT2 |
| SELECT_IN1_OUT2 | SELECT_IN1 | SELECT_OUT2 |
| SELECT_ALL | SELECT_OUT1 | SELECT_IN1 | SELECT_OUT2 |
Context
| Enum | Value |
|---|---|
| CONTEXT_NONE | 0x0 |
| CONTEXT_A | 0x1 << 0x0 |
| CONTEXT_B | 0x1 << 0x1 |
| CONTEXT_BOTH | CONTEXT_A | CONTEXT_B |
Flip
| Enum | Value |
|---|---|
| FLIP_NONE | 0x0 |
| FLIP_HORIZONTAL | 0x1 |
| FLIP_VERTICAL | 0x2 |
| FLIP_REVERSE | 0x3 |
Size
| Enum | Value |
|---|---|
| SIZE_VGA | 0x0 |
| SIZE_QVGA | 0x1 |
| SIZE_QQVGA | 0x2 |
| SIZE_CIF | 0x3 |
| SIZE_QCIF | 0x4 |
| SIZE_DS_LCD | 0x5 |
| SIZE_DS_LCDx4 | 0x6 |
| SIZE_CTR_TOP_LCD | 0x7 |
| SIZE_CTR_BOTTOM_LCD | SIZE_QVGA |
FrameRate
| Enum | Value |
|---|---|
| FRAME_RATE_15 | 0x0 |
| FRAME_RATE_15_TO_5 | 0x1 |
| FRAME_RATE_15_TO_2 | 0x2 |
| FRAME_RATE_10 | 0x3 |
| FRAME_RATE_8_5 | 0x4 |
| FRAME_RATE_5 | 0x5 |
| FRAME_RATE_20 | 0x6 |
| FRAME_RATE_20_TO_5 | 0x7 |
| FRAME_RATE_30 | 0x8 |
| FRAME_RATE_30_TO_5 | 0x9 |
| FRAME_RATE_15_TO_10 | 0xA |
| FRAME_RATE_20_TO_10 | 0xB |
| FRAME_RATE_30_TO_10 | 0xC |
WhiteBalance
| Enum | Value |
|---|---|
| WHITE_BALANCE_AUTO | 0x0 |
| WHITE_BALANCE_3200K | 0x1 |
| WHITE_BALANCE_4150K | 0x2 |
| WHITE_BALANCE_5200K | 0x3 |
| WHITE_BALANCE_6000K | 0x4 |
| WHITE_BALANCE_7000K | 0x5 |
| WHITE_BALANCE_MAX | 0x6 |
| WHITE_BALANCE_NORMAL | WHITE_BALANCE_AUTO |
| WHITE_BALANCE_TUNGSTEN | WHITE_BALANCE_3200K |
| WHITE_BALANCE_WHITE_FLUORESCENT_LIGHT | WHITE_BALANCE_4150K |
| WHITE_BALANCE_DAYLIGHT | WHITE_BALANCE_5200K |
| WHITE_BALANCE_CLOUDY | WHITE_BALANCE_6000K |
| WHITE_BALANCE_HORIZON | WHITE_BALANCE_6000K |
| WHITE_BALANCE_SHADE | WHITE_BALANCE_7000K |
PhotoMode
| Enum | Value |
|---|---|
| PHOTO_MODE_NORMAL | 0x0 |
| PHOTO_MODE_PORTRAIT | 0x1 |
| PHOTO_MODE_LANDSCAPE | 0x2 |
| PHOTO_MODE_NIGHTVIEW | 0x3 |
| PHOTO_MODE_LETTER | 0x4 |
Effect
| Enum | Value |
|---|---|
| EFFECT_NONE | 0x0 |
| EFFECT_MONO | 0x1 |
| EFFECT_SEPIA | 0x2 |
| EFFECT_NEGATIVE | 0x3 |
| EFFECT_NEGAFILM | 0x4 |
| EFFECT_SEPIA01 | 0x5 |
Contrast
| Enum | Value |
|---|---|
| CONTRAST_PATTERN_01 | 0x0 |
| CONTRAST_PATTERN_02 | 0x1 |
| CONTRAST_PATTERN_03 | 0x2 |
| CONTRAST_PATTERN_04 | 0x3 |
| CONTRAST_PATTERN_05 | 0x4 |
| CONTRAST_PATTERN_06 | 0x5 |
| CONTRAST_PATTERN_07 | 0x6 |
| CONTRAST_PATTERN_08 | 0x7 |
| CONTRAST_PATTERN_09 | 0x8 |
| CONTRAST_PATTERN_10 | 0x9 |
| CONTRAST_PATTERN_11 | 0xA |
| CONTRAST_LOW | CONTRAST_PATTERN_05 |
| CONTRAST_NORMAL | CONTRAST_PATTERN_06 |
| CONTRAST_HIGH | CONTRAST_PATTERN_07 |
LensCorrection
| Enum | Value |
|---|---|
| LENS_CORRECTION_OFF | 0x0 |
| LENS_CORRECTION_ON_70 | 0x1 |
| LENS_CORRECTION_ON_90 | 0x2 |
| LENS_CORRECTION_DARK | LENS_CORRECTION_OFF |
| LENS_CORRECTION_NORMAL | LENS_CORRECTION_ON_70 |
| LENS_CORRECTION_BRIGHT | LENS_CORRECTION_ON_90 |
OutputFormat
| Enum | Value |
|---|---|
| OUTPUT_YUV_422 | 0x0 |
| OUTPUT_RGB_565 | 0x1 |
ShutterSoundType
| Enum | Value |
|---|---|
| SHUTTER_SOUND_TYPE_NORMAL | 0x0 |
| SHUTTER_SOUND_TYPE_MOVIE | 0x1 |
| SHUTTER_SOUND_TYPE_MOVIE_END | 0x2 |
ImageQualityCalibrationData
| Type | Field |
|---|---|
| s16 | aeBaseTarget |
| s16 | kRL |
| s16 | kGL |
| s16 | kBL |
| s16 | ccmPosition |
| u16 | awbCcmL9Right |
| u16 | awbCcmL9Left |
| u16 | awbCcmL10Right |
| u16 | awbCcmL10Left |
| u16 | awbX0Right |
| u16 | awbX0Left |
StereoCameraCalibrationData
| Type | Field |
|---|---|
| bool | isValidRotationXY |
| bool[3] | reservedFlag |
| float | scale |
| float | rotationZ |
| float | translationX |
| float | translationY |
| float | rotationX |
| float | rotationY |
| float | angleOfViewRight |
| float | angleOfViewLeft |
| float | distanceToChart |
| float | distanceCameras |
| s16 | imageWidth |
| s16 | imageHeight |
| u8[16] | reserved |
PackageParameterCameraSelect
| Type | Field |
|---|---|
| u8 | CameraSelect camera |
| s8 | exposure |
| u8 | WhiteBalance whiteBalance |
| s8 | sharpness |
| bool | autoExposureOn |
| bool | autoWhiteBalanceOn |
| u8 | FrameRate frameRate |
| u8 | PhotoMode photoMode |
| u8 | contrast |
| u8 | LensCorrection lensCorrection |
| bool | noiseFilterOn |
| u8 | padding |
| s16 | autoExposureWindowX |
| s16 | autoExposureWindowY |
| s16 | autoExposureWindowWidth |
| s16 | autoExposureWindowHeight |
| s16 | autoWhiteBalanceWindowX |
| s16 | autoWhiteBalanceWindowY |
| s16 | autoWhiteBalanceWindowWidth |
| s16 | autoWhiteBalanceWindowHeight |
PackageParameterContext
| Type | Field |
|---|---|
| u8 | CameraSelect camera |
| u8 | Context context |
| u8 | Flip flip |
| u8 | Effect effect |
| u8 | Size size |
PackageParameterContextDetail
| Type | Field |
|---|---|
| u8 | CameraSelect camera |
| u8 | Context context |
| u8 | Flip flip |
| u8 | Effect effect |
| s16 | width |
| s16 | height |
| s16 | cropX0 |
| s16 | cropY0 |
| s16 | cropX1 |
| s16 | cropY1 |
y2r:u
InputFormat
| Enum | Value |
|---|---|
| INPUT_YUV422_INDIV_8 | 0x0 |
| INPUT_YUV420_INDIV_8 | 0x1 |
| INPUT_YUV422_INDIV_16 | 0x2 |
| INPUT_YUV420_INDIV_16 | 0x3 |
| INPUT_YUV422_BATCH | 0x4 |
OutputFormat
| Enum | Value |
|---|---|
| OUTPUT_RGB_32 | 0x0 |
| OUTPUT_RGB_24 | 0x1 |
| OUTPUT_RGB_16_555 | 0x2 |
| OUTPUT_RGB_16_565 | 0x3 |
Rotation
| Enum | Value |
|---|---|
| ROTATION_NONE | 0x0 |
| ROTATION_CLOCKWISE_90 | 0x1 |
| ROTATION_CLOCKWISE_180 | 0x2 |
| ROTATION_CLOCKWISE_270 | 0x3 |
BlockAlignment
| Enum | Value | Description |
|---|---|---|
| BLOCK_LINE | 0x0 | Output buffer's pixels are arranged linearly. Used when outputting to the framebuffer. |
| BLOCK_8_BY_8 | 0x1 | Output buffer's pixels are morton swizzled. Used when outputting to a GPU texture. |
CoefficientParams
| Type | Field |
|---|---|
| u16 | Y_A |
| u16 | R_V |
| u16 | G_V |
| u16 | G_U |
| u16 | B_U |
| u16 | R_Offset |
| u16 | G_Offset |
| u16 | B_Offset |
StandardCoefficient
| Enum | Value |
|---|---|
| COEFFICIENT_ITU_R_BT_601 | 0x0 |
| COEFFICIENT_ITU_R_BT_709 | 0x1 |
| COEFFICIENT_ITU_R_BT_601_SCALING | 0x2 |
| COEFFICIENT_ITU_R_BT_709_SCALING | 0x3 |
DitheringWeightParams
| Type | Field |
|---|---|
| u16 | w0_xEven_yEven |
| u16 | w0_xOdd_yEven |
| u16 | w0_xEven_yOdd |
| u16 | w0_xOdd_yOdd |
| u16 | w1_xEven_yEven |
| u16 | w1_xOdd_yEven |
| u16 | w1_xEven_yOdd |
| u16 | w1_xOdd_yOdd |
| u16 | w2_xEven_yEven |
| u16 | w2_xOdd_yEven |
| u16 | w2_xEven_yOdd |
| u16 | w2_xOdd_yOdd |
| u16 | w3_xEven_yEven |
| u16 | w3_xOdd_yEven |
| u16 | w3_xEven_yOdd |
| u16 | w3_xOdd_yOdd |
PackageParameter
| Type | Field |
|---|---|
| u8 | InputFormat inputFormat |
| u8 | OutputFormat outputFormat |
| u8 | Rotation rotation |
| u8 | BlockAlignment blockAlignment |
| s16 | inputLineWidth |
| s16 | inputLines |
| u8 | StandardCoefficient standardCoefficient |
| u8 | padding |
| s16 | alpha |