[FFmpeg-devel] [PATCH 2/2] avcodec/libwebpenc: support "P" frames in webp animations

Michael Niedermayer michaelni at gmx.at
Sat Nov 1 20:02:37 CET 2014


On Sat, Nov 01, 2014 at 11:57:31AM +0100, Michael Niedermayer wrote:
> On Sat, Nov 01, 2014 at 10:54:33AM +0100, Clément Bœsch wrote:
> > On Fri, Oct 31, 2014 at 04:48:08PM +0100, Michael Niedermayer wrote:
> > > Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> > > ---
> > >  libavcodec/libwebpenc.c |   80 +++++++++++++++++++++++++++++++++++++++++++++--
> > >  1 file changed, 77 insertions(+), 3 deletions(-)
> > > 
> > > diff --git a/libavcodec/libwebpenc.c b/libavcodec/libwebpenc.c
> > > index 4cb8dc3..c7f9784 100644
> > > --- a/libavcodec/libwebpenc.c
> > > +++ b/libavcodec/libwebpenc.c
> > [...]
> > > +                alt_frame->format = AV_PIX_FMT_YUVA420P;
> > > +                for (y = 0; y < frame->height; y+= bs) {
> > > +                    for (x = 0; x < frame->width; x+= bs) {
> > > +                        int skip;
> > > +                        int sse = 0;
> > > +                        for (p = 0; p < 3; p++) {
> > > +                            int bs2 = bs >> !!p;
> > 
> > > +                            int w = frame->width  >> !!p;
> > > +                            int h = frame->height >> !!p;
> > 
> > Does it work with odd dimensions? Same below
> 
> yes it works, and replaced by
>                             int w = FF_CEIL_RSHIFT(frame->width , !!p);
>                             int h = FF_CEIL_RSHIFT(frame->height, !!p);
> same for the 2nd occurance

patch applied

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

During times of universal deceit, telling the truth becomes a
revolutionary act. -- George Orwell
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20141101/17a38577/attachment.asc>


More information about the ffmpeg-devel mailing list