[vlc-devel] [PATCH 1/3] video_output: do not forward visible dimensions in the filter chain

Rémi Denis-Courmont remi at remlab.net
Fri Feb 21 20:09:12 CET 2014


Le vendredi 21 février 2014, 19:49:38 Felix Abecassis a écrit :
> For instance when using a 90 degrees rotation for 1080p, the new
> fmt_current is 1080x1920, with the previous code the visible
> dimensions of fmt_target would be set to 1080x1920 with
> i_width/i_height set to 1920x1080. This is clearly wrong.

Well this is weird because the transform filter does seem to correctly patch 
both visible and physical dimensions, as well as the aspect ratio.

> ---
>  src/video_output/video_output.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/src/video_output/video_output.c
> b/src/video_output/video_output.c index 64bef99..426fb2f 100644
> --- a/src/video_output/video_output.c
> +++ b/src/video_output/video_output.c
> @@ -795,7 +795,11 @@ static void ThreadChangeFilters(vout_thread_t *vout,
>          fmt_current = *filter_chain_GetFmtOut(chain);
>          vlc_array_clear(array);
>      }
> -    VideoFormatCopyCropAr(&fmt_target.video, &fmt_current.video);
> +
> +    /* Copy aspect-ratio modification */
> +    fmt_target.video.i_sar_num = fmt_current.video.i_sar_num;
> +    fmt_target.video.i_sar_den = fmt_current.video.i_sar_den;

I may be dumb but I do not see the link with "visible dimensions".

> +
>      if (!es_format_IsSimilar(&fmt_current, &fmt_target)) {
>          msg_Dbg(vout, "Adding a filter to compensate for format changes");
>          if (!filter_chain_AppendFilter(vout->p->filter.chain_interactive,
> NULL, NULL,

-- 
Реми Денис-Курмон
http://www.remlab.net/




More information about the vlc-devel mailing list