[FFmpeg-devel] [PATCH] lowres=3 support in mpegvideo decoder
Michael Niedermayer
michaelni
Fri Jan 15 22:34:44 CET 2010
On Fri, Jan 15, 2010 at 09:16:43PM +0300, Anatoliy Nenashev wrote:
> Hi!
> Here goes a patch for lowres=3 support in MPEG video decoder.
does this have some practical use?
> mpegvideo.c | 29 ++++++++++++++++-------------
> 1 file changed, 16 insertions(+), 13 deletions(-)
> bae3f45f531d15f5236ec407d10ef1107604fd56 mpeg_lowres.patch
> diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
> index ea96cbe..81d814b 100644
> --- a/libavcodec/mpegvideo.c
> +++ b/libavcodec/mpegvideo.c
> @@ -1416,6 +1416,7 @@ static inline int hpel_motion_lowres(MpegEncContext *s,
> int motion_x, int motion_y)
> {
> const int lowres= s->avctx->lowres;
> + const int op_index = (lowres < 3) ? lowres : 2;
FFMIN
> const int s_mask= (2<<lowres)-1;
> int emu=0;
> int sx, sy;
> @@ -1440,11 +1441,11 @@ static inline int hpel_motion_lowres(MpegEncContext *s,
> emu=1;
> }
>
> - sx <<= 2 - lowres;
> - sy <<= 2 - lowres;
> + sx = ( sx << (3 - lowres) ) >> 1;
> + sy = ( sy << (3 - lowres) ) >> 1;
that can be done simpler
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Into a blind darkness they enter who follow after the Ignorance,
they as if into a greater darkness enter who devote themselves
to the Knowledge alone. -- Isha Upanishad
-------------- 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/20100115/6d56823a/attachment.pgp>
More information about the ffmpeg-devel
mailing list