[FFmpeg-devel] [PATCH v1 5/5] avcodec/v210enc: define DEFINE_V210_ENCODE_FUNC to remove duplicate code

Limin Wang lance.lmwang at gmail.com
Sat Aug 31 10:26:22 EEST 2019


On Fri, Aug 30, 2019 at 08:11:17PM +0200, Michael Niedermayer wrote:
> On Wed, Aug 28, 2019 at 11:45:16PM +0800, lance.lmwang at gmail.com wrote:
> > From: Limin Wang <lance.lmwang at gmail.com>
> > 
> > Signed-off-by: Limin Wang <lance.lmwang at gmail.com>
> > ---
> >  libavcodec/v210enc.c | 171 +++++++++++++++++++++------------------------------
> >  1 file changed, 69 insertions(+), 102 deletions(-)
> > 
> > diff --git a/libavcodec/v210enc.c b/libavcodec/v210enc.c
> > index 2400538..b40c7ae 100644
> > --- a/libavcodec/v210enc.c
> > +++ b/libavcodec/v210enc.c
> > @@ -89,15 +89,77 @@ FF_ENABLE_DEPRECATION_WARNINGS
> >      return 0;
> >  }
> >  
> > +#define DEFINE_V210_ENCODE_FUNC(nbits, depth)                                 \
> > +static void v210_enc_##depth(AVCodecContext *avctx,                           \
> > +        uint8_t *dst, const AVFrame *pic)                                     \
> 
> puting this in a seperate file which is included twice would avoid
> the rather large mutiline macro
> also that would match how such functions for multiple depths are
> handled in other codecs

That's OK, I'll add a template file for the function.


> 
> thx
> 
> [...]
> -- 
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
> 
> The smallest minority on earth is the individual. Those who deny 
> individual rights cannot claim to be defenders of minorities. - Ayn Rand



> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".



More information about the ffmpeg-devel mailing list