[FFmpeg-devel] [PATCH][RFC] variable frame sizes

Eric Buehl eric.buehl
Thu Jun 18 18:50:05 CEST 2009


v5b.patch

Blocks of statements elsewhere are not always aligned.  When do you normally
do this?

On Thu, Jun 18, 2009 at 4:21 AM, Michael Niedermayer <michaelni at gmx.at>wrote:

> On Fri, Jun 12, 2009 at 10:52:56AM -0700, Eric Buehl wrote:
> > v5a.patch
> [...]
> > @@ -920,6 +938,49 @@
> >      if (ost->video_resample) {
> >          padding_src = NULL;
> >          final_picture = &ost->pict_tmp;
> > +        if(  (ost->resample_height != (ist->st->codec->height -
> (ost->topBand + ost->bottomBand)))
> > +          || (ost->resample_width != (ist->st->codec->width -
> (ost->leftBand + ost->rightBand)))) {
> > +
> > +
> > +            fprintf(stderr,"Input Stream #%d.%d frame size changed to
> %dx%d\n", ist->file_index, ist->index, ist->st->codec->width,
> ist->st->codec->height);
> > +            /* keep bands proportional to the frame size */
> > +            topBand    = MAKE_EVEN((int64_t)ist->st->codec->height *
> ost->original_topBand / ost->original_height);
> > +            bottomBand = MAKE_EVEN((int64_t)ist->st->codec->height *
> ost->original_bottomBand / ost->original_height);
> > +            leftBand   = MAKE_EVEN((int64_t)ist->st->codec->width *
> ost->original_leftBand / ost->original_width);
> > +            rightBand  = MAKE_EVEN((int64_t)ist->st->codec->width *
> ost->original_rightBand / ost->original_width);
>
> can be aligned like:
> topBand    = MAKE_EVEN((int64_t)ist->st->codec->height *
> ost->original_topBand    / ost->original_height);
> bottomBand = MAKE_EVEN((int64_t)ist->st->codec->height *
> ost->original_bottomBand / ost->original_height);
> leftBand   = MAKE_EVEN((int64_t)ist->st->codec->width  *
> ost->original_leftBand   / ost->original_width);
> rightBand  = MAKE_EVEN((int64_t)ist->st->codec->width  *
> ost->original_rightBand  / ost->original_width);
>
>
>
> > +
>
> trailing whitespace
>
>
> [...]
> --
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> Old school: Use the lowest level language in which you can solve the
> problem
>            conveniently.
> New school: Use the highest level language in which the latest
> supercomputer
>            can solve the problem without the user falling asleep waiting.
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
>
> iD8DBQFKOiMwYR7HhwQLD6sRAuVHAJ93t4nW8iMGOLApZQS9NNoUmVNj4ACghe2J
> OWpBUCpx909F4AO4wgs7nXc=
> =7fHQ
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dynamic_frame_height_adjust_v5b.patch
Type: text/x-diff
Size: 5460 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090618/8c091b76/attachment.patch>



More information about the ffmpeg-devel mailing list