summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2007-02-18 01:24:57 +0000
committerMichael Niedermayer <michaelni@gmx.at>2007-02-18 01:24:57 +0000
commitd19f5acb361a2474abf90b3108c4e2ebdc8b2740 (patch)
treef4bdea69d670d4048d039e5eb334cad6d78a9deb /libavcodec
parent492d0e4c12325eeec0423c44b007eebbffef7d57 (diff)
factorize fill_rectangle() calls
Originally committed as revision 8016 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/h264.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index a2d307a5cf..1835a98d15 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -1468,6 +1468,8 @@ static inline void pred_direct_motion(H264Context * const h, int *mb_type){
}
if(IS_16X16(*mb_type)){
+ int a=0, b=0;
+
fill_rectangle(&h->ref_cache[0][scan8[0]], 4, 4, 8, (uint8_t)ref[0], 1);
fill_rectangle(&h->ref_cache[1][scan8[0]], 4, 4, 8, (uint8_t)ref[1], 1);
if(!IS_INTRA(mb_type_col)
@@ -1475,17 +1477,15 @@ static inline void pred_direct_motion(H264Context * const h, int *mb_type){
|| (l1ref0[0] < 0 && l1ref1[0] == 0 && FFABS(l1mv1[0][0]) <= 1 && FFABS(l1mv1[0][1]) <= 1
&& (h->x264_build>33 || !h->x264_build)))){
if(ref[0] > 0)
- fill_rectangle(&h->mv_cache[0][scan8[0]], 4, 4, 8, pack16to32(mv[0][0],mv[0][1]), 4);
- else
- fill_rectangle(&h->mv_cache[0][scan8[0]], 4, 4, 8, 0, 4);
+ a= pack16to32(mv[0][0],mv[0][1]);
if(ref[1] > 0)
- fill_rectangle(&h->mv_cache[1][scan8[0]], 4, 4, 8, pack16to32(mv[1][0],mv[1][1]), 4);
- else
- fill_rectangle(&h->mv_cache[1][scan8[0]], 4, 4, 8, 0, 4);
+ b= pack16to32(mv[1][0],mv[1][1]);
}else{
- fill_rectangle(&h->mv_cache[0][scan8[0]], 4, 4, 8, pack16to32(mv[0][0],mv[0][1]), 4);
- fill_rectangle(&h->mv_cache[1][scan8[0]], 4, 4, 8, pack16to32(mv[1][0],mv[1][1]), 4);
+ a= pack16to32(mv[0][0],mv[0][1]);
+ b= pack16to32(mv[1][0],mv[1][1]);
}
+ fill_rectangle(&h->mv_cache[0][scan8[0]], 4, 4, 8, a, 4);
+ fill_rectangle(&h->mv_cache[1][scan8[0]], 4, 4, 8, b, 4);
}else{
for(i8=0; i8<4; i8++){
const int x8 = i8&1;