[vlc-devel] [PATCH 05/11] Video output: support rotated movies

Matthias Keiser matthias at tristan-inc.com
Wed Mar 12 21:52:11 CET 2014


Am 12.03.2014 um 18:45 schrieb Rémi Denis-Courmont <remi at remlab.net>:

> Le jeudi 6 mars 2014, 01:12:26 Matthias Keiser a écrit :
>> ---
>> src/video_output/video_output.c | 5 ++++-
>> 1 file changed, 4 insertions(+), 1 deletion(-)
>> 
>> diff --git a/src/video_output/video_output.c
>> b/src/video_output/video_output.c index 64bef99..a629e9f 100644
>> --- a/src/video_output/video_output.c
>> +++ b/src/video_output/video_output.c
>> @@ -918,6 +918,7 @@ static int ThreadDisplayRenderPicture(vout_thread_t
>> *vout, bool is_forced) vd->info.subpicture_chromas &&
>>                            *vd->info.subpicture_chromas != 0;
>>     const bool do_early_spu = !do_dr_spu &&
>> +                               vd->source.orientation ==
>> vd->fmt.orientation && //snapshots will be missing subpictures in this case
>> (vd->info.is_slow ||
> 
> Please wrap. I'm not sure why this is needed, so maybe this needs a bit more 
> text in the commit message.

Since snapshots are not filtered through the display filter chain, they are never rotated. The means subpictures are oriented wrongly (no matter if we do or don't  call video_format_ApplyRotation before spu_Render). I think the question is why snapshots are not filtered through the display filter chain, after all the user probably wants to make a snapshot of what he sees. This would solve the problem. But I was hoping we could let the bug slide for the current version of this patch. If this is ok I will simply change the wrap.

>>                                sys->display.use_dr ||
>>                                do_snapshot ||
>> @@ -964,8 +965,10 @@ static int ThreadDisplayRenderPicture(vout_thread_t
>> *vout, bool is_forced) }
>>     }
>> 
>> +    video_format_t fmt_spu_rot;
>> +    video_format_ApplyRotation(&fmt_spu, &fmt_spu_rot);
>>     subpicture_t *subpic = spu_Render(vout->p->spu,
>> -                                      subpicture_chromas, &fmt_spu,
>> +                                      subpicture_chromas, &fmt_spu_rot,
> 
> Should this not rather be done in spu_Render()? I don't know but there are two 
> other call sites for spu_Render().

The other call sites seem to be all via stream_out/transcode. Since I don't think the rotation stuff which is going on on the display level plays any role in transcoding, I don't think we should apply the rotation to the subpictures in these cases. It's actually a similar issue as above.

>>                                       &vd->source,
>>                                       render_subtitle_date,
>> render_osd_date, do_snapshot);
> 
> -- 
> Rémi Denis-Courmont
> http://www.remlab.net/
> 
> _______________________________________________
> 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