[vlc-devel] [PATCH 3/12] esformat: fix ORIENT_LEFT_BOTTOM and ORIENT_RIGHT_TOP descriptions

Romain Vimont rom1v at videolabs.io
Sat Sep 26 18:57:17 CEST 2020


On Sat, Sep 26, 2020 at 06:48:21PM +0200, Romain Vimont wrote:
> On Sat, Sep 26, 2020 at 06:04:03PM +0300, Rémi Denis-Courmont wrote:
> > Le lauantaina 26. syyskuuta 2020, 13.48.59 EEST Romain Vimont a écrit :
> > > On Thu, Sep 24, 2020 at 11:29:58PM +0100, Lyndon Brown wrote:
> > > > From: Lyndon Brown <jnqnfe at gmail.com>
> > > > Date: Sun, 7 Jan 2018 19:22:38 +0000
> > > > Subject: esformat: fix ORIENT_LEFT_BOTTOM and ORIENT_RIGHT_TOP
> > > > descriptions
> > > > 
> > > > They had 90 degree clockwise / anti-clockwise rotation the wrong way
> > > > around.
> > > > 
> > > > diff --git a/include/vlc_es.h b/include/vlc_es.h
> > > > index a7af6c118c..841fa05bf6 100644
> > > > --- a/include/vlc_es.h
> > > > +++ b/include/vlc_es.h
> > > > @@ -181,8 +181,8 @@ typedef enum video_orientation_t
> > > > 
> > > >      ORIENT_BOTTOM_LEFT, /**< Flipped vertically */
> > > >      ORIENT_BOTTOM_RIGHT, /**< Rotated 180 degrees */
> > > >      ORIENT_LEFT_TOP, /**< Transposed */
> > > > 
> > > > -    ORIENT_LEFT_BOTTOM, /**< Rotated 90 degrees clockwise */
> > > > -    ORIENT_RIGHT_TOP, /**< Rotated 90 degrees anti-clockwise */
> > > > +    ORIENT_LEFT_BOTTOM, /**< Rotated 90 degrees anti-clockwise */
> > > > +    ORIENT_RIGHT_TOP, /**< Rotated 90 degrees clockwise */
> > > 
> > > I think is was correct before the patch:
> > > 
> > > ORIENT_LEFT_BOTTOM: top line represents LEFT, left column BOTTOM.
> > 
> > Left-bottom means the top row is stored in the left column and the left column 
> > is stored in the bottom row.
> 
> This is not what I understand from the comment:
> 
> > ORIENT_TOP_LEFT = 0, /**< Top line represents top, left column left. */)
> 
> (the fact that this comment applies on a NORMAL orientation does not
> help)
> 
> There are two sources of confusions for me.
> 
> Does video_orientation_t represent:
>  1. how the image has been rotated before storage, or
>  2. how the stored data must be rotated for display?
> 
> What is the meaning of ORIENT_XXX_YYY?
>  A. the top row in memory represents the XXX of the picture,
>     the left column in memory represents the YYY of the picture, or
>  B. the top row of the picture is stored in the XXX in memory,
>     the left column of the picture is stored in the YYY in memory?
> 
> What is the expected video_orientation_t for this example?
> 
>         capture    storage    display
>          A---B      D---A      A---B
>          |   | ---> |   | ---> |   |
>          D---C      C---B      D---C

And an additional source of confusion is the expected direction of
ORIENT_ROTATED_90? Does it mean 90 CW or CCW?

If it's not specified, I assume angles are expressed in CCW ("sens
trigonométrique" in French). Is that correct?


More information about the vlc-devel mailing list