[vlc-devel] [PATCH v2 01/13] opengl: explicit texture scaling computation

Romain Vimont rom1v at videolabs.io
Thu Apr 1 16:07:16 UTC 2021


On Thu, Apr 01, 2021 at 05:57:04PM +0200, Alexandre Janniaux wrote:
> Hi,
> 
> I´m not sure I understand this patch completely.
> The explanation in the comment makes perfect sense, and is
> quite depicted here by the SEMIPLANAR fourcc macro:
> 
>     #define SEMIPLANAR(w_den, h_den, size, bits) \
>         { .plane_count = 2, \
>           .p = { {.w = {1,    1}, .h = {1,    1}}, \
>                  {.w = {2,w_den}, .h = {1,h_den}} }, \
>           .pixel_size = size, \
>           .pixel_bits = bits }
> 
> But then, the width will always have 2 at this location
> for SEMIPLANAR descriptions and we don´t need the more
> general DivideRationalByTwo macro?

IIUC, you suggest to remove DivideRationalByTwo() because we can assume
that the width numerator is always 2.

But IMO the OpenGL interop implementation should not depend on this
implementation detail from src/misc/fourcc.c.

Regards


More information about the vlc-devel mailing list