feat(codec): implement software H.264 encode/decode round-trip
Add FFmpeg-based encoder/decoder with SPS/PPS extradata, Annex-B output normalization, low-latency libx264 settings, and a round-trip unit test. Includes review hardening: cached SwsContext, bitrate-only rate control, std::byte/uin8_t cast helpers, and richer test assertions.
This commit is contained in:
+5
-5
@@ -20,10 +20,10 @@ previous one is validated.
|
||||
**Goal**: encode raw pixel buffers to H.264 and decode them back, purely with
|
||||
FFmpeg software paths.
|
||||
|
||||
- Add `libavcodec`, `libavutil`, `libswscale` dependencies.
|
||||
- Implement `EncoderFactory::create()` and `Encoder::encode()`.
|
||||
- Implement `DecoderFactory::create()` and `Decoder::decode()`.
|
||||
- Round-trip test: synthetic RGB frames → H.264 → decoded RGB.
|
||||
- [x] Add `libavcodec`, `libavutil`, `libswscale` dependencies.
|
||||
- [x] Implement `EncoderFactory::create()` and `Encoder::encode()`.
|
||||
- [x] Implement `DecoderFactory::create()` and `Decoder::decode()`.
|
||||
- [x] Round-trip test: synthetic RGB frames → H.264 → decoded RGB.
|
||||
|
||||
**Validation**: unit test produces visually/structurally correct round-trip
|
||||
frames.
|
||||
@@ -89,4 +89,4 @@ where available.
|
||||
|
||||
## Current phase
|
||||
|
||||
Phase 2 — software H.264 encode/decode.
|
||||
Phase 3 — PipeWire screen capture.
|
||||
|
||||
Reference in New Issue
Block a user