Commit 2865f1c2 authored by stefang's avatar stefang

make use of 16x16 motion comp functions, 16x8 and 8x16 do not seem to be worth it


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@5646 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 523a5494
...@@ -485,8 +485,20 @@ static inline void mc_part_std(AVSContext *h,int square,int chroma_height,int de ...@@ -485,8 +485,20 @@ static inline void mc_part_std(AVSContext *h,int square,int chroma_height,int de
} }
} }
static void inter_pred(AVSContext *h) { static void inter_pred(AVSContext *h, enum mb_t mb_type) {
/* always do 8x8 blocks TODO: are larger blocks worth it? */ switch(mb_type) {
case P_SKIP:
case P_16X16:
case B_FWD_16X16:
case B_BWD_16X16:
case B_SYM_16X16:
mc_part_std(h, 1, 8, 0, h->cy, h->cu, h->cv, 0, 0,
h->s.dsp.put_cavs_qpel_pixels_tab[0],
h->s.dsp.put_h264_chroma_pixels_tab[0],
h->s.dsp.avg_cavs_qpel_pixels_tab[0],
h->s.dsp.avg_h264_chroma_pixels_tab[0],&h->mv[MV_FWD_X0]);
break;
default:
mc_part_std(h, 1, 4, 0, h->cy, h->cu, h->cv, 0, 0, mc_part_std(h, 1, 4, 0, h->cy, h->cu, h->cv, 0, 0,
h->s.dsp.put_cavs_qpel_pixels_tab[1], h->s.dsp.put_cavs_qpel_pixels_tab[1],
h->s.dsp.put_h264_chroma_pixels_tab[1], h->s.dsp.put_h264_chroma_pixels_tab[1],
...@@ -507,6 +519,8 @@ static void inter_pred(AVSContext *h) { ...@@ -507,6 +519,8 @@ static void inter_pred(AVSContext *h) {
h->s.dsp.put_h264_chroma_pixels_tab[1], h->s.dsp.put_h264_chroma_pixels_tab[1],
h->s.dsp.avg_cavs_qpel_pixels_tab[1], h->s.dsp.avg_cavs_qpel_pixels_tab[1],
h->s.dsp.avg_h264_chroma_pixels_tab[1],&h->mv[MV_FWD_X3]); h->s.dsp.avg_h264_chroma_pixels_tab[1],&h->mv[MV_FWD_X3]);
break;
}
/* set intra prediction modes to default values */ /* set intra prediction modes to default values */
h->pred_mode_Y[3] = h->pred_mode_Y[6] = INTRA_L_LP; h->pred_mode_Y[3] = h->pred_mode_Y[6] = INTRA_L_LP;
h->top_pred_Y[h->mbx*2+0] = h->top_pred_Y[h->mbx*2+1] = INTRA_L_LP; h->top_pred_Y[h->mbx*2+0] = h->top_pred_Y[h->mbx*2+1] = INTRA_L_LP;
...@@ -1008,7 +1022,7 @@ static void decode_mb_p(AVSContext *h, enum mb_t mb_type) { ...@@ -1008,7 +1022,7 @@ static void decode_mb_p(AVSContext *h, enum mb_t mb_type) {
mv_pred(h, MV_FWD_X2, MV_FWD_X1, MV_PRED_MEDIAN, BLK_8X8, ref[2]); mv_pred(h, MV_FWD_X2, MV_FWD_X1, MV_PRED_MEDIAN, BLK_8X8, ref[2]);
mv_pred(h, MV_FWD_X3, MV_FWD_X0, MV_PRED_MEDIAN, BLK_8X8, ref[3]); mv_pred(h, MV_FWD_X3, MV_FWD_X0, MV_PRED_MEDIAN, BLK_8X8, ref[3]);
} }
inter_pred(h); inter_pred(h, mb_type);
store_mvs(h); store_mvs(h);
if(mb_type != P_SKIP) if(mb_type != P_SKIP)
decode_residual_inter(h); decode_residual_inter(h);
...@@ -1125,7 +1139,7 @@ static void decode_mb_b(AVSContext *h, enum mb_t mb_type) { ...@@ -1125,7 +1139,7 @@ static void decode_mb_b(AVSContext *h, enum mb_t mb_type) {
mv_pred(h, MV_BWD_X1, MV_BWD_C2, MV_PRED_TOPRIGHT,BLK_8X16, 0); mv_pred(h, MV_BWD_X1, MV_BWD_C2, MV_PRED_TOPRIGHT,BLK_8X16, 0);
} }
} }
inter_pred(h); inter_pred(h, mb_type);
if(mb_type != B_SKIP) if(mb_type != B_SKIP)
decode_residual_inter(h); decode_residual_inter(h);
filter_mb(h,mb_type); filter_mb(h,mb_type);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment