[FFmpeg-devel] [PATCH] avutil/display: fix inverted doc

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Sun Dec 12 13:07:39 EET 2021


Zhao Zhili:
> ---
>  libavutil/display.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavutil/display.h b/libavutil/display.h
> index 515adad795..d87bf68425 100644
> --- a/libavutil/display.h
> +++ b/libavutil/display.h
> @@ -88,7 +88,7 @@
>  double av_display_rotation_get(const int32_t matrix[9]);
>  
>  /**
> - * Initialize a transformation matrix describing a pure counterclockwise
> + * Initialize a transformation matrix describing a pure clockwise
>   * rotation by the specified angle (in degrees).
>   *
>   * @param matrix an allocated transformation matrix (will be fully overwritten
> 

If you look at the documentation, you will notice that the matrix
returned from the function is supposed to be multiplied from the right
to the coordinate (row) vector, not from the left to the coordinate
(column) vector as is standard in linear algebra. This is tantamount to
transposing the matrix which for rotation matrices means negating the
degree. So this doxy is correct.
Notice that last time I looked at this, I came to the conclusion that
the whole H.2645 SEI parsing code uses it wrongly.

- Andreas


More information about the ffmpeg-devel mailing list