diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2004-10-28 10:12:57 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2004-10-28 10:12:57 +0000 |
commit | 1c3990dbba6a1e594c8a273e85c8460d90d29643 (patch) | |
tree | 432737cb6f39a6f434f284d6bacf0f56c1886430 /libavcodec/motion_est.c | |
parent | d7e2f57f0e6d1b8f51dd8f5b3324263d4b4d935a (diff) | |
download | ffmpeg-1c3990dbba6a1e594c8a273e85c8460d90d29643.tar.gz |
H.261 encoder by (Maarten Daniels <maarten dot daniels at luc dot ac dot be>)
Originally committed as revision 3643 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/motion_est.c')
-rw-r--r-- | libavcodec/motion_est.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libavcodec/motion_est.c b/libavcodec/motion_est.c index 64550edffc..cf36d931a4 100644 --- a/libavcodec/motion_est.c +++ b/libavcodec/motion_est.c @@ -279,6 +279,10 @@ void ff_init_me(MpegEncContext *s){ c->hpel_put[2][2]= c->hpel_put[2][3]= zero_hpel; } + if(s->codec_id == CODEC_ID_H261){ + c->sub_motion_search= no_sub_motion_search; + } + c->temp= c->scratchpad; } @@ -691,6 +695,12 @@ static inline void get_limits(MpegEncContext *s, int x, int y) c->ymin = - y - 16; c->xmax = - x + s->mb_width *16; c->ymax = - y + s->mb_height*16; + } else if (s->out_format == FMT_H261){ + // Search range of H261 is different from other codec standards + c->xmin = (x > 15) ? - 15 : 0; + c->ymin = (y > 15) ? - 15 : 0; + c->xmax = (x < s->mb_width * 16 - 16) ? 15 : 0; + c->ymax = (y < s->mb_height * 16 - 16) ? 15 : 0; } else { c->xmin = - x; c->ymin = - y; |