[FFmpeg-devel] [PATCH] enc is not a good name for a decoder context

Michael Niedermayer michaelni
Tue Feb 16 23:14:47 CET 2010


On Tue, Feb 16, 2010 at 09:05:35PM +0100, Stefano Sabatini wrote:
> On date Tuesday 2010-02-16 03:08:35 +0100, Michael Niedermayer encoded:
> > On Mon, Feb 15, 2010 at 07:27:32PM -0500, Ronald S. Bultje wrote:
> > > Hi,
> > > 
> > > On Mon, Feb 15, 2010 at 7:23 PM, Stefano Sabatini
> > > <stefano.sabatini-lala at poste.it> wrote:
> > > > On date Wednesday 2009-12-30 00:14:31 +0100, Stefano Sabatini encoded:
> > > >> On date Tuesday 2009-12-29 01:21:13 +0100, Michael Niedermayer encoded:
> > > >> > avctx
> > > >>
> > > >> Mmh.. no I don't believe that's a good name either, try to ask what
> > > >> that could mean to someone which never looked at the FFmpeg source...
> > > >> dec_ctx or even codec_ctx are way more intelligible names IMO...
> > > >
> > > > Ping?
> > > 
> > > I agree anything is better than enc. AVCodecContext already tells us
> > > it's a avctx. I'd go for dec also, maybe decctx.
> > 
> > dec is highly ambigous it can be a AVCodec, AVCodecContext or some struct
> > private to ffplay.c or even a char * 
> > avctx is much clearer
> > and you only know the type when you look it up not when you see a
> > variable used somewhere, this takes time and makes reading code
> > harder
> > 
> > also iam maintainer of the file, making it hard to read for me is not
> > a good idea at all
> > thats besides that avctx is very widespreadly used for AVCodecContext
> > starting a bikeshed rename in ffplay is really silly
> > and renaming all avctx in all decoders to dec is also silly because
> > dec or decctx are very ambigous in a decoder.
> 
> I don't see how dec_ctx can be ambiguos, DECoder ConTeXt is its
> natural interpretation, avctx is much more ambiguous (Audio Video
> ConTeXt, context of what?).

dec_ctx does not clarify audio vs video.
and decoder vs. encoder is clear in a player


> 
> That said, I agree that bikeshedding on this would be silly and I'm
> reasonably fine with avctx so if you prefer avctx over dec_ctx I'll
> apply that.

i prefer avctx

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The real ebay dictionary, page 3
"Rare item" - "Common item with rare defect or maybe just a lie"
"Professional" - "'Toy' made in china, not functional except as doorstop"
"Experts will know" - "The seller hopes you are not an expert"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100216/c6330015/attachment.pgp>



More information about the ffmpeg-devel mailing list