Commit a78e1a0f authored by michael's avatar michael

fixing twice added offset bug, was triggered by 4mv + sub_cmp != mb_cmp

bug was introduced in version 1.75 (2003-12-30)
this may have lead to a small drop in quality of the 4mv mode, but should have only affected the mbd=0 case


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@2698 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent b424b08f
...@@ -846,7 +846,7 @@ static inline int h263_mv4_search(MpegEncContext *s, int mx, int my, int shift) ...@@ -846,7 +846,7 @@ static inline int h263_mv4_search(MpegEncContext *s, int mx, int my, int shift)
uint8_t *dest_y = s->me.scratchpad + offset; uint8_t *dest_y = s->me.scratchpad + offset;
if(s->quarter_sample){ if(s->quarter_sample){
uint8_t *ref= ref_data[0] + (mx4>>2) + (my4>>2)*stride + offset; uint8_t *ref= ref_data[0] + (mx4>>2) + (my4>>2)*stride;
dxy = ((my4 & 3) << 2) | (mx4 & 3); dxy = ((my4 & 3) << 2) | (mx4 & 3);
if(s->no_rounding) if(s->no_rounding)
...@@ -854,7 +854,7 @@ static inline int h263_mv4_search(MpegEncContext *s, int mx, int my, int shift) ...@@ -854,7 +854,7 @@ static inline int h263_mv4_search(MpegEncContext *s, int mx, int my, int shift)
else else
s->dsp.put_qpel_pixels_tab [1][dxy](dest_y , ref , stride); s->dsp.put_qpel_pixels_tab [1][dxy](dest_y , ref , stride);
}else{ }else{
uint8_t *ref= ref_data[0] + (mx4>>1) + (my4>>1)*stride + offset; uint8_t *ref= ref_data[0] + (mx4>>1) + (my4>>1)*stride;
dxy = ((my4 & 1) << 1) | (mx4 & 1); dxy = ((my4 & 1) << 1) | (mx4 & 1);
if(s->no_rounding) if(s->no_rounding)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment