[vlc-devel] [PATCH] codec: cea708: Add aspect ratio aware positioning

Felix Paul Kühne fkuehne at videolan.org
Wed May 28 15:15:49 UTC 2025


Hello Thomas,

Thanks for your patch! Please note that we no longer accept any patches on our mailing list. Please open a merge request here: http://code.videolan.org/videolan/vlc/

Thanks again!

Felix

> On 28. May 2025, at 12:52, Thomas Symborski <thomas.symborski at gmail.com> wrote:
> 
> This patch enhances CEA-708 closed caption positioning to be aspect ratio
> aware, addressing specification compliance issues where captions were
> positioned incorrectly on different video aspect ratios.
> 
> The implementation dynamically selects between 4:3 (160 columns) and 16:9
> (210 columns) grid layouts based on the source video's display aspect ratio
> (DAR). CEA-608 captions continue to use the traditional 4:3 grid exclusively
> for backward compatibility. The font scaling ratio has been corrected from
> 1.06 to 1.3 to improve visual consistency.
> 
> Changes include:
> - Dynamic aspect ratio detection in CEA708SpuConvert using DAR calculation
> - Grid selection logic (4:3 for DAR < 5:3, 16:9 for DAR >= 5:3)
> - New UPDT_REGION_USES_16_9_GRID flag in substext.h
> - Comprehensive test suite with aspect ratio and integration tests
> - Updated build system configuration for new tests
> 
> Testing performed:
> - Unit tests validate aspect ratio calculations for common video formats
> - Integration tests verify decoder functionality with different formats
> - Regression testing confirms no impact on existing CEA-608 functionality
> - Tests pass on both autotools and meson build systems
> 
> This addresses positioning inaccuracies on widescreen content and improves
> specification compliance for modern broadcast standards.
> 
> Signed-off-by: Thomas Symborski <thomas.symborski at gmail.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cea708-aspect-ratio-positioning.patch
Type: application/octet-stream
Size: 30385 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20250528/f75e7c01/attachment.obj>
-------------- next part --------------
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel



More information about the vlc-devel mailing list