[FFmpeg-devel] [PATCH 2/2] avcodec/libwebpenc: support "P" frames in webp animations
Michael Niedermayer
michaelni at gmx.at
Sat Nov 1 11:57:31 CET 2014
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
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
If you think the mosad wants you dead since a long time then you are either
wrong or dead since a long time.
-------------- 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/0118872a/attachment.asc>
More information about the ffmpeg-devel
mailing list