Scaling tx video#32
Open
sunilnom wants to merge 5 commits into
Open
Conversation
- Fix format specifiers: use %u for uint32_t width/height (UB fix) - Rename tx_1session.json -> tx_fullhd_single_session.json - Rename tx_3sessions.json -> tx_fullhd_multi_session.json - Add tx_2k_single_session.json and tx_2k_multi_session.json - Add tx_4k_single_session.json and tx_4k_multi_session.json - Add unit tests for 2K and 4K resolution validation - Update README with supported resolutions table (1080p, 2K, 4K)
- Add scale_width/scale_height config options in video block - Integrate sws_scale in decoder pipeline for scaling - Validate scale dimensions (max 4K, even width, both required) - Crop bounds checked against effective (scaled) dimensions - Update session manager fallback to use scaled dimensions - Add scale_width/scale_height to all config JSON files - Add 8 unit tests for scaling validation - Update README with scaling documentation and log format
There was a problem hiding this comment.
Pull request overview
Adds optional video scaling support to dvledtx configuration so decoded frames can be upscaled/downscaled before per-session crop/tiling is applied. This extends the existing config/validation/decode/crop pipeline to operate on “effective” (scaled) dimensions.
Changes:
- Introduce
scale_width/scale_heightin config parsing, validation, and app context. - Apply scaled dimensions through FFmpeg decode setup and session crop calculations.
- Add unit tests and README documentation for scaling behavior; update sample configs.
Reviewed changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
src/util/config_reader.c |
Parse new scale fields, validate them, and validate crop bounds against scaled (“effective”) dimensions; propagate to app context and logs. |
src/ffmpeg/ffmpeg_decoder.c |
Use scaled dimensions as FFmpeg sws_scale target size for shared/per-session decode. |
src/core/session_manager.c |
Base default crop sizing / strip splitting on scaled (“effective”) dimensions. |
include/util/config_reader.h |
Add scale_width / scale_height to dvledtx_config. |
include/app_context.h |
Add scale_width / scale_height to runtime app context. |
tests/test_config_reader.c |
Add validate_tx_config unit tests for scaling scenarios. |
README.md |
Document scaling fields and behavior, including an example and expected logs. |
config/tx_fullhd_single_session.json |
Add scale fields to sample config. |
config/tx_fullhd_multi_session.json |
Add scale fields to sample config. |
config/tx_2k_single_session.json |
Add scale fields to sample config. |
config/tx_2k_multi_session.json |
Add scale fields to sample config. |
config/tx_4k_single_session.json |
Add scaling example values; update crop accordingly. |
config/tx_4k_multi_session.json |
Add scaling example values; update crops accordingly. |
.gitignore |
Ignore dvledtx.log. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
dmkarthi
reviewed
Jun 17, 2026
- Move scale_width, scale_height, fps, fmt to new tx_video section in all config JSON files - Fix scale dimension validation to check chroma alignment per pixel format (e.g. yuv420 requires even height, gbrp* has no alignment) - Fix absolute tx_url paths in tx_4k configs to use relative filenames - Default missing payload_type to 96 instead of failing parse - Update README scaling note to document format alignment constraints - Add test for odd scale_height rejection with yuv420 format - Update tests to use new tx_video JSON section
…type - Move scale_width/scale_height/fps/fmt to tx_video section in config table - Update JSON examples to use tx_video section - Mark payload_type as optional (defaults to 96) - Remove payload_type from config JSON files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Checklist
Code Quality
Testing
Review Readiness
Documentation
Security
PR Type
What kind of change does this PR introduce?