diff cavs.c @ 5239:5760ab0250aa libavcodec

move modification of intra prediction modes into its own inline function
author stefang
date Sat, 07 Jul 2007 06:15:05 +0000
parents 871a49faf887
children 1701ce572fed
line wrap: on
line diff
--- a/cavs.c	Sat Jul 07 05:27:59 2007 +0000
+++ b/cavs.c	Sat Jul 07 06:15:05 2007 +0000
@@ -616,24 +616,7 @@
         av_log(h->s.avctx, AV_LOG_ERROR, "illegal intra chroma pred mode\n");
         return -1;
     }
-
-    /* save pred modes before they get modified */
-    h->pred_mode_Y[3] =  h->pred_mode_Y[5];
-    h->pred_mode_Y[6] =  h->pred_mode_Y[8];
-    h->top_pred_Y[h->mbx*2+0] = h->pred_mode_Y[7];
-    h->top_pred_Y[h->mbx*2+1] = h->pred_mode_Y[8];
-
-    /* modify pred modes according to availability of neighbour samples */
-    if(!(h->flags & A_AVAIL)) {
-        modify_pred(left_modifier_l, &h->pred_mode_Y[4] );
-        modify_pred(left_modifier_l, &h->pred_mode_Y[7] );
-        modify_pred(left_modifier_c, &pred_mode_uv );
-    }
-    if(!(h->flags & B_AVAIL)) {
-        modify_pred(top_modifier_l, &h->pred_mode_Y[4] );
-        modify_pred(top_modifier_l, &h->pred_mode_Y[5] );
-        modify_pred(top_modifier_c, &pred_mode_uv );
-    }
+    modify_mb_i(h, &pred_mode_uv);
 
     /* get coded block pattern */
     if(h->pic_type == FF_I_TYPE)