mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-02-03 21:23:48 +00:00
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/CCExtractor/ccextractor/pull/1850
Author: @gaurav02081
Created: 12/19/2025
Status: ✅ Merged
Merged: 1/9/2026
Merged by: @cfsmp3
Base:
master← Head:gaurav-v1📝 Commits (8)
609a53f[BUG] -out=spupng with EIA608/teletext: offset values in XML may be not correct #8932b708c4Enhance SPUPNG offset calculations and XML tag handling in EIA608 encoder6ed09eaSPUPNG: fix formatting to match clang-formatbf9841aMerge branch 'master' into gaurav-v1e42bc2bfixed the merged conflict in the ccx_encoders_common.h1f5d3dfMerge branch 'master' of https://github.com/gaurav02081/ccextractor into gaurav-v191f2540Merge branch 'master' into gaurav-v1c609f66Removed Build Artifact📊 Changes
5 files changed (+53 additions, -10 deletions)
View changed files
📝
docs/CHANGES.TXT(+1 -0)📝
src/lib_ccx/ccx_encoders_common.c(+1 -0)📝
src/lib_ccx/ccx_encoders_common.h(+3 -3)📝
src/lib_ccx/ccx_encoders_spupng.c(+46 -7)📝
src/lib_ccx/ccx_encoders_structs.h(+2 -0)📄 Description
[FIX]
In raising this pull request, I confirm the following (please check boxes):
My familiarity with the project is as follows (check one):
[FIX] -out=spupng with EIA608/teletext: offset values in XML may be not correct #893
The issue occurs because the offsets were hardcoded for a 544×390 subtitle image centered on a 720×480 NTSC screen, while the text-to-PNG renderer generates PNGs with different (dynamic) dimensions (e.g. 600px wide and variable height). This results in visibly misaligned subtitles, especially for Teletext (PAL) sources.
This PR removes the hardcoded NTSC assumptions and calculates SPUPNG offsets dynamically based on the actual rendered PNG geometry and the target screen resolution.
Key changes =>
2 .Introduce an is_pal flag in encoder_ctx to distinguish PAL (576 lines) vs NTSC (480 lines)
4.Add a helper to compute centered xOffset / yOffset dynamically
Enforce even yOffset to prevent interlacing flicker on DVD/SPU
Apply the new logic only to the text-to-SPUPNG pipeline, leaving the bitmap path unchanged
This aligns the text-based SPUPNG output with the already-correct bitmap SPUPNG behavior.
So ,Subtitles are correctly positioned regardless of PNG width/height (PNG size decides the offset — not hardcoded values.).
in the given image i have drawn the flow of this fix .

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.