summaryrefslogtreecommitdiff
path: root/libavcodec/cavsdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-11-18 03:16:38 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-11-18 03:16:38 +0100
commitcdbebae44440bea97f300f256d722c1495753bc2 (patch)
treeb9fc7a0e480d3c10bd950cd8495b48982f78de78 /libavcodec/cavsdec.c
parent8426edef4cf521104bb9288ac46a48dc4bdaee53 (diff)
parent85dc006b1a829726dd5e3a9b0fcc6a1dbfe6dffa (diff)
Merge commit '85dc006b1a829726dd5e3a9b0fcc6a1dbfe6dffa'
* commit '85dc006b1a829726dd5e3a9b0fcc6a1dbfe6dffa': lavc: fix bitshifts amount bigger than the type Conflicts: libavcodec/internal.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/cavsdec.c')
-rw-r--r--libavcodec/cavsdec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/cavsdec.c b/libavcodec/cavsdec.c
index 42306cc8a4..b5304eab9e 100644
--- a/libavcodec/cavsdec.c
+++ b/libavcodec/cavsdec.c
@@ -467,7 +467,7 @@ static inline void mv_pred_direct(AVSContext *h, cavs_vector *pmv_fw,
{
cavs_vector *pmv_bw = pmv_fw + MV_BWD_OFFS;
int den = h->direct_den[col_mv->ref];
- int m = col_mv->x >> 31;
+ int m = FF_SIGNBIT(col_mv->x);
pmv_fw->dist = h->dist[1];
pmv_bw->dist = h->dist[0];
@@ -476,7 +476,7 @@ static inline void mv_pred_direct(AVSContext *h, cavs_vector *pmv_fw,
/* scale the co-located motion vector according to its temporal span */
pmv_fw->x = (((den + (den * col_mv->x * pmv_fw->dist ^ m) - m - 1) >> 14) ^ m) - m;
pmv_bw->x = m - (((den + (den * col_mv->x * pmv_bw->dist ^ m) - m - 1) >> 14) ^ m);
- m = col_mv->y >> 31;
+ m = FF_SIGNBIT(col_mv->y);
pmv_fw->y = (((den + (den * col_mv->y * pmv_fw->dist ^ m) - m - 1) >> 14) ^ m) - m;
pmv_bw->y = m - (((den + (den * col_mv->y * pmv_bw->dist ^ m) - m - 1) >> 14) ^ m);
}