From 664f2519663464501d800edd98669857175136e5 Mon Sep 17 00:00:00 2001 From: Steve Lhomme Date: Wed, 6 Mar 2024 13:43:07 +0100 Subject: [PATCH] vout_subpicture: remove write-only original size in rendered subpicture It was only used by the display modules rendering (scaled) regions. That was always set to the video placement dimensions in the display, which they already know about. --- include/vlc_subpicture.h | 2 -- src/misc/subpicture.c | 2 -- src/video_output/vout_subpictures.c | 2 -- test/modules/video_output/opengl/sub_renderer.c | 2 -- 4 files changed, 8 deletions(-) diff --git a/include/vlc_subpicture.h b/include/vlc_subpicture.h index 7043509c02..d468465cb3 100644 --- a/include/vlc_subpicture.h +++ b/include/vlc_subpicture.h @@ -216,8 +216,6 @@ struct vlc_render_subpicture { struct VLC_VECTOR(struct subpicture_region_rendered *) regions; /**< list of regions to render */ int64_t i_order; /** an increasing unique number */ - unsigned i_original_picture_width; /**< original width of the movie */ - unsigned i_original_picture_height;/**< original height of the movie */ }; typedef struct vlc_render_subpicture vlc_render_subpicture; diff --git a/src/misc/subpicture.c b/src/misc/subpicture.c index 881749685c..08e37e51e2 100644 --- a/src/misc/subpicture.c +++ b/src/misc/subpicture.c @@ -103,8 +103,6 @@ vlc_render_subpicture *vlc_render_subpicture_New( void ) vlc_render_subpicture *p_subpic = malloc( sizeof(*p_subpic) ); if( unlikely(p_subpic == NULL ) ) return NULL; - p_subpic->i_original_picture_width = 0; - p_subpic->i_original_picture_height = 0; vlc_vector_init(&p_subpic->regions); return p_subpic; } diff --git a/src/video_output/vout_subpictures.c b/src/video_output/vout_subpictures.c index 49b0bf71c4..191335f93d 100644 --- a/src/video_output/vout_subpictures.c +++ b/src/video_output/vout_subpictures.c @@ -1270,8 +1270,6 @@ static vlc_render_subpicture *SpuRenderSubpictures(spu_t *spu, if (unlikely(output == NULL)) return NULL; output->i_order = p_entries[i_subpicture - 1].subpic->i_order; - output->i_original_picture_width = fmt_dst->i_visible_width; - output->i_original_picture_height = fmt_dst->i_visible_height; struct subpicture_region_rendered *output_last_ptr; /* Allocate area array for subtitle overlap */ diff --git a/test/modules/video_output/opengl/sub_renderer.c b/test/modules/video_output/opengl/sub_renderer.c index 5297edaf9b..a57b1002a0 100644 --- a/test/modules/video_output/opengl/sub_renderer.c +++ b/test/modules/video_output/opengl/sub_renderer.c @@ -177,8 +177,6 @@ static void test_opengl_offscreen( vlc_render_subpicture *subpicture = vlc_render_subpicture_New(); assert(subpicture != NULL); - subpicture->i_original_picture_width = 4; - subpicture->i_original_picture_height = 4; struct subpicture_region_rendered *p_region = calloc(1, sizeof(*p_region)); assert(p_region != NULL);