[vlc-devel] [PATCH 1/7] Support for rotated MP4 Movies (bug #2882)

Rémi Denis-Courmont remi at remlab.net
Mon Feb 17 09:46:53 CET 2014


What the heck is this patch for? I totally fail to see the point.

On Mon, 17 Feb 2014 01:26:06 +0100, Matthias Keiser
<matthias at tristan-inc.com> wrote:
> The following patches all supersede the ones from this thread:
> 
>
https://mailman.videolan.org/pipermail/vlc-devel/2014-February/096648.html
> 
> ---
>  include/vlc_es.h | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/include/vlc_es.h b/include/vlc_es.h
> index 38d63da..5e13ed5 100644
> --- a/include/vlc_es.h
> +++ b/include/vlc_es.h
> @@ -153,6 +153,8 @@ typedef enum video_orientation_t
>      ORIENT_RIGHT_BOTTOM, /**< Anti-transposed */
>  
>      ORIENT_NORMAL      = ORIENT_TOP_LEFT,
> +    ORIENT_TRANSPOSED  = ORIENT_LEFT_TOP,
> +    ORIENT_ANTI_TRANSPOSED = ORIENT_RIGHT_BOTTOM,
>      ORIENT_HFLIPPED    = ORIENT_TOP_RIGHT,
>      ORIENT_VFLIPPED    = ORIENT_BOTTOM_LEFT,
>      ORIENT_ROTATED_180 = ORIENT_BOTTOM_RIGHT,
> @@ -166,7 +168,8 @@ typedef enum video_orientation_t
>  /** If the orientation is natural or mirrored */
>  #define ORIENT_IS_MIRROR(orient) parity(orient)
>  /** If the orientation swaps dimensions */
> -#define ORIENT_IS_SWAP(orient) (((orient) & 4) != 0)
> +#define ORIENT_IS_SWAP(orient) ((orient) == ORIENT_TRANSPOSED ||
(orient)
> == ORIENT_ANTI_TRANSPOSED || \
> +    (orient) == ORIENT_ROTATED_90 || (orient) == ORIENT_ROTATED_270)

And the difference is? Make the code less efficient?

>  /** Applies horizontal flip to an orientation */
>  #define ORIENT_HFLIP(orient) ((orient) ^ 1)
>  /** Applies vertical flip to an orientation */

-- 
Rémi Denis-Courmont
Sent from my collocated server



More information about the vlc-devel mailing list