[FFmpeg-cvslog] Merge commit '0242351390643d176b10600c2eb854414f9559e6'

Derek Buitenhuis git at videolan.org
Wed Apr 13 17:29:52 CEST 2016


ffmpeg | branch: master | Derek Buitenhuis <derek.buitenhuis at gmail.com> | Wed Apr 13 16:28:41 2016 +0100| [d3e1c6f975021ef5a096faa2d27e42922def63fb] | committer: Derek Buitenhuis

Merge commit '0242351390643d176b10600c2eb854414f9559e6'

* commit '0242351390643d176b10600c2eb854414f9559e6':
  mpegvideo: Fix undefined negative shifts in mpeg_motion_internal

Merged-by: Derek Buitenhuis <derek.buitenhuis at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d3e1c6f975021ef5a096faa2d27e42922def63fb
---

 libavcodec/mpegvideo_motion.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavcodec/mpegvideo_motion.c b/libavcodec/mpegvideo_motion.c
index 51ba435..5deb2c8 100644
--- a/libavcodec/mpegvideo_motion.c
+++ b/libavcodec/mpegvideo_motion.c
@@ -544,7 +544,7 @@ static inline void qpel_motion(MpegEncContext *s,
         s->vdsp.emulated_edge_mc(s->sc.edge_emu_buffer, ptr_y,
                                  s->linesize, s->linesize,
                                  17, 17 + field_based,
-                                 src_x, src_y << field_based,
+                                 src_x, src_y * (1 << field_based),
                                  s->h_edge_pos, s->v_edge_pos);
         ptr_y = s->sc.edge_emu_buffer;
         if (!CONFIG_GRAY || !(s->avctx->flags & AV_CODEC_FLAG_GRAY)) {
@@ -553,12 +553,12 @@ static inline void qpel_motion(MpegEncContext *s,
             s->vdsp.emulated_edge_mc(ubuf, ptr_cb,
                                      s->uvlinesize, s->uvlinesize,
                                      9, 9 + field_based,
-                                     uvsrc_x, uvsrc_y << field_based,
+                                     uvsrc_x, uvsrc_y * (1 << field_based),
                                      s->h_edge_pos >> 1, s->v_edge_pos >> 1);
             s->vdsp.emulated_edge_mc(vbuf, ptr_cr,
                                      s->uvlinesize, s->uvlinesize,
                                      9, 9 + field_based,
-                                     uvsrc_x, uvsrc_y << field_based,
+                                     uvsrc_x, uvsrc_y * (1 << field_based),
                                      s->h_edge_pos >> 1, s->v_edge_pos >> 1);
             ptr_cb = ubuf;
             ptr_cr = vbuf;


======================================================================

diff --cc libavcodec/mpegvideo_motion.c
index 51ba435,aaa6e61..5deb2c8
--- a/libavcodec/mpegvideo_motion.c
+++ b/libavcodec/mpegvideo_motion.c
@@@ -548,20 -546,19 +548,20 @@@ static inline void qpel_motion(MpegEncC
                                   s->h_edge_pos, s->v_edge_pos);
          ptr_y = s->sc.edge_emu_buffer;
          if (!CONFIG_GRAY || !(s->avctx->flags & AV_CODEC_FLAG_GRAY)) {
 -            uint8_t *uvbuf = s->sc.edge_emu_buffer + 18 * s->linesize;
 -            s->vdsp.emulated_edge_mc(uvbuf, ptr_cb,
 +            uint8_t *ubuf = s->sc.edge_emu_buffer + 18 * s->linesize;
 +            uint8_t *vbuf = ubuf + 9 * s->uvlinesize;
 +            s->vdsp.emulated_edge_mc(ubuf, ptr_cb,
                                       s->uvlinesize, s->uvlinesize,
                                       9, 9 + field_based,
-                                      uvsrc_x, uvsrc_y << field_based,
+                                      uvsrc_x, uvsrc_y * (1 << field_based),
                                       s->h_edge_pos >> 1, s->v_edge_pos >> 1);
 -            s->vdsp.emulated_edge_mc(uvbuf + 16, ptr_cr,
 +            s->vdsp.emulated_edge_mc(vbuf, ptr_cr,
                                       s->uvlinesize, s->uvlinesize,
                                       9, 9 + field_based,
-                                      uvsrc_x, uvsrc_y << field_based,
+                                      uvsrc_x, uvsrc_y * (1 << field_based),
                                       s->h_edge_pos >> 1, s->v_edge_pos >> 1);
 -            ptr_cb = uvbuf;
 -            ptr_cr = uvbuf + 16;
 +            ptr_cb = ubuf;
 +            ptr_cr = vbuf;
          }
      }
  



More information about the ffmpeg-cvslog mailing list