summaryrefslogtreecommitdiff
path: root/libavcodec/h264.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2008-08-05 11:17:23 +0000
committerMichael Niedermayer <michaelni@gmx.at>2008-08-05 11:17:23 +0000
commitc210fa61cfc3963bbfe934b1c1c0688394b9d29a (patch)
treeaad549b020aa4e221850b4c207cc7de71fa35ab5 /libavcodec/h264.c
parentcc615d2ce8fd3dc651a9fc2cc9c522afd706fc06 (diff)
simplify y_shift/ref_shift code
Originally committed as revision 14620 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r--libavcodec/h264.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index acdedd9b1f..6980304fa0 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -1173,17 +1173,8 @@ single_col:
}
if(IS_INTERLACED(*mb_type) != IS_INTERLACED(mb_type_col[0])){
/* FIXME assumes direct_8x8_inference == 1 */
- int y_shift;
- int ref_shift;
-
- if(IS_INTERLACED(*mb_type)){
- /* frame to field scaling */
- y_shift = 0;
- ref_shift= FRAME_MBAFF ? 0 : 1;
- }else{
- y_shift = 2;
- ref_shift= FRAME_MBAFF ? 2 : 1;
- }
+ int y_shift = 2*!IS_INTERLACED(*mb_type);
+ int ref_shift= FRAME_MBAFF ? y_shift : 1;
for(i8=0; i8<4; i8++){
const int x8 = i8&1;