[vlc-commits] subpicture: add a zoom factor in horizontal and vertical
Steve Lhomme
git at videolan.org
Mon Nov 26 08:56:35 CET 2018
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Thu Nov 22 13:30:02 2018 +0100| [3c02695fb1443698b4d23925d6d1e7cf93713c8b] | committer: Steve Lhomme
subpicture: add a zoom factor in horizontal and vertical
So it can be scaled virtually without altering the actual data.
(provided the vout can handle it)
This should only be used for picture based SPU. Text should always
be rendered at full resolution.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3c02695fb1443698b4d23925d6d1e7cf93713c8b
---
include/vlc_subpicture.h | 3 +++
src/misc/subpicture.c | 3 +++
2 files changed, 6 insertions(+)
diff --git a/include/vlc_subpicture.h b/include/vlc_subpicture.h
index f001df0894..3271671c30 100644
--- a/include/vlc_subpicture.h
+++ b/include/vlc_subpicture.h
@@ -74,6 +74,9 @@ struct subpicture_region_t
int i_max_width; /** horizontal rendering/cropping target/limit */
int i_max_height; /** vertical rendering/cropping target/limit */
+ vlc_rational_t zoom_h;
+ vlc_rational_t zoom_v;
+
subpicture_region_t *p_next; /**< next region in the list */
subpicture_region_private_t *p_private; /**< Private data for spu_t *only* */
};
diff --git a/src/misc/subpicture.c b/src/misc/subpicture.c
index dd9fafe3eb..287717eb89 100644
--- a/src/misc/subpicture.c
+++ b/src/misc/subpicture.c
@@ -209,6 +209,9 @@ subpicture_region_t *subpicture_region_New( const video_format_t *p_fmt )
if( !p_region )
return NULL;
+ p_region->zoom_h.den = p_region->zoom_h.num = 1;
+ p_region->zoom_v.den = p_region->zoom_v.num = 1;
+
if ( p_fmt->i_chroma == VLC_CODEC_YUVP )
{
video_format_Copy( &p_region->fmt, p_fmt );
More information about the vlc-commits
mailing list