[FFmpeg-devel] [PATCH v2 3/7] avcodec/avframe: add new side data types for Bar Data

Devin Heitmueller devin.heitmueller at ltnglobal.com
Mon Jul 3 15:51:20 EEST 2023


On Sat, Jul 1, 2023 at 4:11 AM Anton Khirnov <anton at khirnov.net> wrote:
> >  /**
> > + * Bar data - used by side data for avcodec and avframe.  Defines the location
> > + * of horizontal or vertical black bars (i.e. letterbox/pillar bars)
> > + */
> > +typedef struct AVBarData {
> > +    int top_bottom; /* 0=top/bottom 1=left/right */
> > +    int top;
> > +    int left;
> > +    int bottom;
> > +    int right;
>
> Am I understanding correctly that half of these are never used for a
> given AVBarData instance? Seems wasteful. Could make it a generic
> bound0, bound1 or a union instead.

It was only an extra eight bytes per video frame, so I wasn't
particularly worried about the size.  That said, perhaps a union would
make it more clear that you can't set both simultaneously.

Devin

-- 
Devin Heitmueller, Senior Software Engineer
LTN Global Communications
o: +1 (301) 363-1001
w: https://ltnglobal.com  e: devin.heitmueller at ltnglobal.com


More information about the ffmpeg-devel mailing list