[FFmpeg-devel] [PATCH/RFC] Make dvvideo encoder less lenient wrt resolution and pixel format

Michael Niedermayer michaelni
Fri Dec 11 20:25:50 CET 2009


On Fri, Dec 11, 2009 at 04:42:05PM +0100, Tomas H?rdin wrote:
> On Fri, 2009-12-11 at 16:34 +0100, Diego Biurrun wrote:
> > On Fri, Dec 11, 2009 at 04:25:48PM +0100, Tomas H?rdin wrote:
> > > On Fri, 2009-12-11 at 15:53 +0100, Diego Biurrun wrote:
> > > > On Fri, Dec 11, 2009 at 01:42:46PM +0100, Tomas H?rdin wrote:
> > > > > On Fri, 2009-12-11 at 13:29 +0100, Michael Niedermayer wrote:
> > > > > > 
> > > > > > retry without putting newlines in the middle of patches
> > > > > 
> > > > > Odd, I made sure to paste the lines correctly. Probably Evolution doing
> > > > > things wrong. Attaching the patch to this mail instead.
> > > > 
> > > > OK, now please retry with K&R coding style, i.e.
> > > > 
> > > > > --- libavcodec/dv.c	(revision 20797)
> > > > > +++ libavcodec/dv.c	(working copy)
> > > > > @@ -398,6 +398,15 @@
> > > > >  
> > > > > +static av_cold int dvvideo_init_encoder(AVCodecContext *avctx) {
> > > > 
> > > > { on the next line for function declarations
> > > > 
> > > > > +    if(!ff_dv_codec_profile(avctx)) {
> > > > 
> > > > if (
> > > > 
> > > > > +        av_log(avctx, AV_LOG_ERROR, "Found no DV profile for %ix%i %s video\n", avctx->width, avctx->height, avcodec_get_pix_fmt_name(avctx->pix_fmt));
> > > > 
> > > > Break this overly long line.
> > > 
> > > Done. I guess I've been coding Java a bit too long :)
> > 
> > Yes, that can spoil anyone ;)
> > 
> > > I went with a line break and single 4-space tab to break up the av_log()
> > > call since I couldn't find any systematic indentation for such cases (I
> > > saw 0, 4, 5 and 8 spaces).
> > 
> > Umm, no, you should align the next line with the first character after
> > the opening parenthesis, i.e.
> > 
> > > --- libavcodec/dv.c	(revision 20797)
> > > +++ libavcodec/dv.c	(working copy)
> > > @@ -398,6 +398,17 @@
> > >  
> > > +static av_cold int dvvideo_init_encoder(AVCodecContext *avctx)
> > > +{
> > > +    if (!ff_dv_codec_profile(avctx)) {
> > > +        av_log(avctx, AV_LOG_ERROR, "Found no DV profile for %ix%i %s video\n",
> > > +            avctx->width, avctx->height, avcodec_get_pix_fmt_name(avctx->pix_fmt));
> > 
> >   av_log(avctx, AV_LOG_ERROR, "Found no DV profile for %ix%i %s video\n",
> >          avctx->width, avctx->height, avcodec_get_pix_fmt_name(avctx->pix_fmt));
> > 
> > Diego
> 
> OK, fixed. Third time's the charm..
> 
> /Tomas

>  dv.c |   13 ++++++++++++-
>  1 file changed, 12 insertions(+), 1 deletion(-)
> f0ea4b4f670c89b59b97d5c4d9edebfaebeb6bf3  dv.diff

ok if tested (regression tests)

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Why not whip the teacher when the pupil misbehaves? -- Diogenes of Sinope
-------------- 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/20091211/2cba5000/attachment.pgp>



More information about the ffmpeg-devel mailing list