camera_controller
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
camera_controller [2025/05/14 21:38] – arisotura | camera_controller [2025/05/17 11:50] (current) – arisotura | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Camera controller ====== | ====== Camera controller ====== | ||
- | NOTE: this is a findings dump for now. It is unclear what is what, so there may be stuff pertaining to the h265 codec in here. Not sure how interwoven it is with the camera controller. | + | NOTE: this is a findings dump for now. It is unclear what is what, so there may be stuff pertaining to the h264 codec in here. Not sure how interwoven it is with the camera controller. |
Known registers: | Known registers: | ||
Line 7: | Line 7: | ||
^ Address | ^ Address | ||
| 0xF0000800 | ??? (might not be strictly camera-related) | | | 0xF0000800 | ??? (might not be strictly camera-related) | | ||
- | | 0xF000081C | + | | 0xF0000818 |
- | | 0xF0000820 | ??? set to 0x400000 | + | | 0xF000081C | Base address for processed camera |
+ | | 0xF0000820 | Base address for third buffer?? | | ||
+ | | 0xF0000824 | Base address for raw camera buffer | ||
| 0xF0000828 | ??? set to same as F000081C | | | 0xF0000828 | ??? set to same as F000081C | | ||
| 0xF000082C | ??? set to 0x400000 | | | 0xF000082C | ??? set to 0x400000 | | ||
- | | || | ||
- | | 0xF0008414 | ??? | | ||
- | | 0xF0008420 | ??? | | ||
- | | 0xF0008460 | ??? buffer? position? | | ||
- | | 0xF0008468 | IRQ status/ack for IRQ 0x11 | | ||
- | | 0xF000846C | ??? buffer? position? | | ||
- | | 0xF0008470 | ??? buffer? position? | | ||
- | | 0xF0008474 | ??? buffer? position? | | ||
- | | 0xF0008478 | ??? IRQ enable flags?? | | ||
- | | 0xF00084A4 | buffer address for incoming h265 data? | | ||
- | | 0xF00084A8 | another buffer address? | | ||
- | | 0xF00084AC | ??? buffer? position? | | ||
- | | 0xF00084B0 | IRQ status/ack for IRQ 0x12 | | ||
- | | 0xF00084B8 | ??? | | ||
| || | | || | ||
| 0xF0008800 | ??? | | | 0xF0008800 | ??? | | ||
Line 59: | Line 47: | ||
^ IRQ ^ Desc. ^ | ^ IRQ ^ Desc. ^ | ||
- | | 0x10 | h264 decoding? | | + | | 0x10 | camera processing? | |
- | | 0x11 | h264 encoding? | | + | |
| 0x14 | Camera event | | | 0x14 | Camera event | | ||
| 0x1D | ??? | | | 0x1D | ??? | | ||
+ | |||
+ | The camera controller can write output to atleast three different buffers: | ||
+ | * Raw camera buffer, that is, picture data straight out of the camera | ||
+ | * Processed camera buffer, picture data going through extra processing (round-trip through H264 codec?) | ||
+ | * Third buffer, not known for what | ||
Line 86: | Line 78: | ||
These IRQ conditions are connected to IRQ 0x14. | These IRQ conditions are connected to IRQ 0x14. | ||
+ | |||
+ | |||
+ | ===== Camera video format ===== | ||
+ | |||
+ | The video data produced by the camera is YUV, encoded in a NV12-like interleaved format. | ||
+ | |||
+ | The data is split in chunks of 48 bytes. In each chunk, the first 16 bytes are Y values for a row of 16 pixels, the next 16 bytes are Y values for the next row (underneath the first row), the next 8 bytes are U values, and the last 8 bytes are V values. U/V value pairs are shared across blocks of 2x2 pixels. | ||
+ | |||
+ | Oddly, it seems that in each row, the values are stored backwards, and this regardless of the camera' | ||
+ | |||
+ | The camera can produce data in other formats, but it's not yet known how they work. Also unknown if the controller supports different encodings. | ||
camera_controller.1747258733.txt.gz · Last modified: 2025/05/14 21:38 by arisotura