Skip to content

Scaling tx video#32

Open
sunilnom wants to merge 5 commits into
OpenVisualCloud:mainfrom
sunilnom:scaling_tx
Open

Scaling tx video#32
sunilnom wants to merge 5 commits into
OpenVisualCloud:mainfrom
sunilnom:scaling_tx

Conversation

@sunilnom

Copy link
Copy Markdown
Contributor

Description

Checklist

Code Quality

  • Code follows project style guidelines
  • No unnecessary debug logs or commented-out code
  • No hardcoded values / secrets

Testing

  • Unit test added/modified accordingly
  • Perform manual basic sanity testing at system level

Review Readiness

  • PR title and description are clear and meaningful
  • Story/Task IDs are linked

Documentation

  • README or relevant docs updated (if applicable)

Security

  • No sensitive data exposed (keys, passwords, tokens)
  • Input validation added where needed

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Documentation content changes
  • Testing
  • Other... Please describe:

- 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

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_height in 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.

Comment thread src/util/config_reader.c Outdated
Comment thread config/tx_4k_single_session.json Outdated
Comment thread config/tx_4k_multi_session.json Outdated
Comment thread README.md Outdated
Comment thread tests/test_config_reader.c
Comment thread config/tx_2k_multi_session.json
Comment thread config/tx_4k_multi_session.json Outdated
sunilnom added 3 commits June 17, 2026 13:29
- 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants