[vlc-devel] [PATCH 06/17] vout: the filed of view cannot be 0

Thomas Guillem thomas at gllm.fr
Mon Nov 14 17:56:44 CET 2016


in title: filed of view -> field of view, but this should be squashed
with "core: add viewpoint to change the yaw/pitch/roll/fow/zoom..."

On Mon, Nov 14, 2016, at 15:16, Steve Lhomme wrote:
> add some macros to translate millidegrees
> ---
>  include/vlc_vout.h | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/include/vlc_vout.h b/include/vlc_vout.h
> index baf9b15..88f401e 100644
> --- a/include/vlc_vout.h
> +++ b/include/vlc_vout.h
> @@ -82,6 +82,10 @@ struct vout_thread_t {
>  #define VOUT_ALIGN_BOTTOM       0x0008
>  #define VOUT_ALIGN_VMASK        0x000C
>  
> +#define VLC_VIEWPOINT_DEGREES_UNIT  1000.f
> +#define TO_MILLI_INT(d)      ((int32_t) (d *
> VLC_VIEWPOINT_DEGREES_UNIT))
> +#define FROM_MILLI_INT(d)    ((float) d / VLC_VIEWPOINT_DEGREES_UNIT)

You miss a suffix like VLC_VIEWPOINT_*

> +
>  struct vlc_viewpoint_t {
>      int32_t yaw;   /* yaw in 0.001 degrees */
>      int32_t pitch; /* pitch in 0.001 degrees */
> @@ -93,6 +97,7 @@ struct vlc_viewpoint_t {
>  static inline void vlc_viewpoint_init( vlc_viewpoint_t *p_vp )
>  {
>      memset( p_vp, 0, sizeof(*p_vp) );
> +    p_vp->fov = TO_MILLI_INT( DEFAULT_FIELD_OF_VIEW_DEGREES );
>  }
>  
>  /*****************************************************************************
> -- 
> 2.10.1
> 
> _______________________________________________
> 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