h264_codec
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
h264_codec [2025/05/16 22:24] – created arisotura | h264_codec [2025/05/25 18:31] (current) – arisotura | ||
---|---|---|---|
Line 6: | Line 6: | ||
^ Address | ^ Address | ||
+ | | 0xF0008404 | ??? | | ||
+ | | 0xF0008408 | ??? | | ||
+ | | 0xF000840C | ??? | | ||
+ | | 0xF0008410 | ??? | | ||
| 0xF0008414 | ??? | | | 0xF0008414 | ??? | | ||
+ | | 0xF0008418 | ??? | | ||
+ | | 0xF000841C | ??? | | ||
| 0xF0008420 | ??? | | | 0xF0008420 | ??? | | ||
+ | | 0xF0008424 | ??? | | ||
+ | | 0xF0008428 | ??? | | ||
+ | | 0xF000842C | ??? | | ||
+ | | 0xF0008430 | ??? | | ||
+ | | 0xF0008434 | ??? | | ||
+ | | 0xF0008438 | ??? | | ||
+ | | 0xF000843C | ??? | | ||
+ | | 0xF0008440 | ??? | | ||
+ | | 0xF0008444 | ??? | | ||
+ | | 0xF0008448 | ??? | | ||
+ | | 0xF000844C | ??? | | ||
+ | | 0xF0008450 | ??? | | ||
+ | | 0xF0008454 | ??? | | ||
+ | | 0xF0008458 | ??? | | ||
+ | | 0xF000845C | ??? | | ||
| 0xF0008460 | Encoding buffer alert position | | | 0xF0008460 | Encoding buffer alert position | | ||
| 0xF0008464 | Encoding buffer current position | | | 0xF0008464 | Encoding buffer current position | | ||
Line 16: | Line 37: | ||
| 0xF0008478 | ??? | | | 0xF0008478 | ??? | | ||
| 0xF000847C | Encoding buffer frame position | | | 0xF000847C | Encoding buffer frame position | | ||
+ | | 0xF0008480 | ??? | | ||
+ | | 0xF000848C | ??? | | ||
+ | | 0xF000849C | ??? | | ||
+ | | 0xF00084A0 | ??? | | ||
| 0xF00084A4 | buffer address for incoming h265 data? | | | 0xF00084A4 | buffer address for incoming h265 data? | | ||
| 0xF00084A8 | another buffer address? | | | 0xF00084A8 | another buffer address? | | ||
- | | 0xF00084AC | ??? buffer? position? | | + | | 0xF00084AC | ??? buffer? position? |
| 0xF00084B0 | Decoding IRQ status/ack | | | 0xF00084B0 | Decoding IRQ status/ack | | ||
| 0xF00084B8 | ??? | | | 0xF00084B8 | ??? | | ||
Line 32: | Line 57: | ||
The encoder side receives video data from the camera, encodes it, and writes the H264 bitstream to RAM. | The encoder side receives video data from the camera, encodes it, and writes the H264 bitstream to RAM. | ||
+ | |||
+ | TODO: figure out what enables/ | ||
TODO: figure out alignment requirements for the various buffer registers | TODO: figure out alignment requirements for the various buffer registers | ||
Line 67: | Line 94: | ||
| 0 | Position alert IRQ | | | 0 | Position alert IRQ | | ||
| 1 | Frame IRQ | | | 1 | Frame IRQ | | ||
- | | 2 | + | | 2 |
- | | 3 | ?? | | + | | 3 |
| 4-7 | ??? | | | 4-7 | ??? | | ||
- | IRQ 0 fires when the current buffer position reaches the alert position. When acknowledging this IRQ, the alert position should be updated, otherwise the IRQ will keep firing as long as the condition is met. | + | IRQ 0 fires when the current buffer position reaches the alert position. When acknowledging this IRQ, the alert position should be updated, otherwise the IRQ will keep firing as long as the condition is met (ie. as long as the current position is equal to or greater than the alert position). |
- | IRQ 1 fires every time a full camera frame is encoded. Register 0xF000847C keeps track of where the frame ends in the encoding buffer. | + | IRQ 1 fires every time a full camera frame is encoded. Register 0xF000847C keeps track of where the frame ends in the encoding buffer. That register must be read, or this IRQ will keep firing. |
- | IRQ 3 will fire repeatedly under certain conditions, not sure which. | + | IRQ 2 fires when the current buffer position reaches the end of the buffer, and wraps around to the start. |
+ | |||
+ | IRQ 3 fires when IRQ 1 should | ||
I haven' | I haven' | ||
+ | |||
+ | The IRQs in this register trigger IRQ 0x11. | ||
Line 110: | Line 141: | ||
Encoding buffer frame position. | Encoding buffer frame position. | ||
+ | |||
+ | ^ Bits ^ Desc. ^ | ||
+ | | 0-23 | Frame position (memory address) | | ||
+ | | 24-31 | Status? 0x09=normal, | ||
Upon IRQ 1, this register points to the end of the frame that was just finished. It seems to be readable once, becoming zero after it has been read. | Upon IRQ 1, this register points to the end of the frame that was just finished. It seems to be readable once, becoming zero after it has been read. | ||
+ | |||
+ | There is a limited backlog ability to this register: if a new IRQ 1 fires while the previous position wasn't read, this register will first return the previous position, then the latest position. However, missing more than one IRQ 1 triggers an error case. | ||
h264_codec.1747434280.txt.gz · Last modified: 2025/05/16 22:24 by arisotura