aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/h264.c
diff options
context:
space:
mode:
authorAlexander Strange <astrange@ithinksw.com>2008-07-02 22:25:17 +0000
committerAlexander Strange <astrange@ithinksw.com>2008-07-02 22:25:17 +0000
commit92ed1ec957951068b7daac38997af81bd855d06e (patch)
tree287b389061ae0e19242eb0fcbea64540771852e2 /libavcodec/h264.c
parent142ee5d73db1389f95434c2c27e9346a08f2db4c (diff)
downloadffmpeg-92ed1ec957951068b7daac38997af81bd855d06e.tar.gz
Use get_cabac_bypass_sign instead of an if/else.
Originally committed as revision 14054 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r--libavcodec/h264.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 561d68ea5f..26dcd90ab5 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -5549,11 +5549,9 @@ static av_always_inline void decode_cabac_residual_internal( H264Context *h, DCT
}
if( is_dc ) {
- if( get_cabac_bypass( CC ) ) block[j] = -coeff_abs;
- else block[j] = coeff_abs;
+ block[j] = get_cabac_bypass_sign( CC, -coeff_abs );
}else{
- if( get_cabac_bypass( CC ) ) block[j] = (-coeff_abs * qmul[j] + 32) >> 6;
- else block[j] = ( coeff_abs * qmul[j] + 32) >> 6;
+ block[j] = (get_cabac_bypass_sign( CC, -coeff_abs ) * qmul[j] + 32) >> 6;
}
}
}