]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/cavsdec.c
misc spelling/grammar/wording fixes in comments
[ffmpeg] / libavcodec / cavsdec.c
index 77041e7feb94a2068a99362215333244e823986e..a9e4cc2b8d1ad1ad2003eaa1d665c8eff3e08aab 100644 (file)
@@ -193,7 +193,7 @@ static int decode_mb_i(AVSContext *h, int cbp_code) {
     uint8_t *left = NULL;
     uint8_t *d;
 
-    init_mb(h);
+    ff_cavs_init_mb(h);
 
     /* get intra prediction modes from stream */
     for(block=0;block<4;block++) {
@@ -216,7 +216,7 @@ static int decode_mb_i(AVSContext *h, int cbp_code) {
         av_log(h->s.avctx, AV_LOG_ERROR, "illegal intra chroma pred mode\n");
         return -1;
     }
-    modify_mb_i(h, &pred_mode_uv);
+    ff_cavs_modify_mb_i(h, &pred_mode_uv);
 
     /* get coded block pattern */
     if(h->pic_type == FF_I_TYPE)
@@ -232,7 +232,7 @@ static int decode_mb_i(AVSContext *h, int cbp_code) {
     /* luma intra prediction interleaved with residual decode/transform/add */
     for(block=0;block<4;block++) {
         d = h->cy + h->luma_scan[block];
-        load_intra_pred_luma(h, top, &left, block);
+        ff_cavs_load_intra_pred_luma(h, top, &left, block);
         h->intra_pred_l[h->pred_mode_Y[ff_cavs_scan3x3[block]]]
             (d, top, left, h->l_stride);
         if(h->cbp & (1<<block))
@@ -240,7 +240,7 @@ static int decode_mb_i(AVSContext *h, int cbp_code) {
     }
 
     /* chroma intra prediction */
-    load_intra_pred_chroma(h);
+    ff_cavs_load_intra_pred_chroma(h);
     h->intra_pred_c[pred_mode_uv](h->cu, &h->top_border_u[h->mbx*10],
                                   h->left_border_u, h->c_stride);
     h->intra_pred_c[pred_mode_uv](h->cv, &h->top_border_v[h->mbx*10],
@@ -256,7 +256,7 @@ static void decode_mb_p(AVSContext *h, enum mb_t mb_type) {
     GetBitContext *gb = &h->s.gb;
     int ref[4];
 
-    init_mb(h);
+    ff_cavs_init_mb(h);
     switch(mb_type) {
     case P_SKIP:
         ff_cavs_mv(h, MV_FWD_X0, MV_FWD_C2, MV_PRED_PSKIP,  BLK_16X16, 0);
@@ -301,7 +301,7 @@ static void decode_mb_b(AVSContext *h, enum mb_t mb_type) {
     enum sub_mb_t sub_type[4];
     int flags;
 
-    init_mb(h);
+    ff_cavs_init_mb(h);
 
     /* reset all MVs */
     h->mv[MV_FWD_X0] = ff_cavs_dir_mv;
@@ -432,7 +432,7 @@ static inline void check_for_slice(AVSContext *h) {
     int align;
     align = (-get_bits_count(gb)) & 7;
     if((show_bits_long(gb,24+align) & 0xFFFFFF) == 0x000001) {
-        get_bits_long(gb,24+align);
+        skip_bits_long(gb,24+align);
         h->stc = get_bits(gb,8);
         decode_slice_header(h,gb);
     }
@@ -455,7 +455,7 @@ static int decode_pic(AVSContext *h) {
             return -1;
         ff_init_scantable(s->dsp.idct_permutation,&h->scantable,ff_zigzag_direct);
     }
-    get_bits(&s->gb,16);//bbv_dwlay
+    skip_bits(&s->gb,16);//bbv_dwlay
     if(h->stc == PIC_PB_START_CODE) {
         h->pic_type = get_bits(&s->gb,2) + FF_I_TYPE;
         if(h->pic_type > FF_B_TYPE) {
@@ -469,7 +469,7 @@ static int decode_pic(AVSContext *h) {
     } else {
         h->pic_type = FF_I_TYPE;
         if(get_bits1(&s->gb))
-            get_bits(&s->gb,16);//time_code
+            skip_bits(&s->gb,16);//time_code
     }
     /* release last B frame */
     if(h->picture.data[0])
@@ -501,7 +501,7 @@ static int decode_pic(AVSContext *h) {
     if(h->progressive)
         h->pic_structure = 1;
     else if(!(h->pic_structure = get_bits1(&s->gb) && (h->stc == PIC_PB_START_CODE)) )
-        get_bits1(&s->gb);     //advanced_pred_mode_disable
+        skip_bits1(&s->gb);     //advanced_pred_mode_disable
     skip_bits1(&s->gb);        //top_field_first
     skip_bits1(&s->gb);        //repeat_first_field
     h->qp_fixed                = get_bits1(&s->gb);
@@ -527,14 +527,14 @@ static int decode_pic(AVSContext *h) {
     if(h->pic_type == FF_I_TYPE) {
         do {
             decode_mb_i(h, 0);
-        } while(next_mb(h));
+        } while(ff_cavs_next_mb(h));
     } else if(h->pic_type == FF_P_TYPE) {
         do {
             if(h->skip_mode_flag) {
                 skip_count = get_ue_golomb(&s->gb);
                 while(skip_count--) {
                     decode_mb_p(h,P_SKIP);
-                    if(!next_mb(h))
+                    if(!ff_cavs_next_mb(h))
                         goto done;
                 }
                 mb_type = get_ue_golomb(&s->gb) + P_16X16;
@@ -544,14 +544,14 @@ static int decode_pic(AVSContext *h) {
                 decode_mb_i(h, mb_type - P_8X8 - 1);
             } else
                 decode_mb_p(h,mb_type);
-        } while(next_mb(h));
+        } while(ff_cavs_next_mb(h));
     } else { /* FF_B_TYPE */
         do {
             if(h->skip_mode_flag) {
                 skip_count = get_ue_golomb(&s->gb);
                 while(skip_count--) {
                     decode_mb_b(h,B_SKIP);
-                    if(!next_mb(h))
+                    if(!ff_cavs_next_mb(h))
                         goto done;
                 }
                 mb_type = get_ue_golomb(&s->gb) + B_DIRECT;
@@ -561,7 +561,7 @@ static int decode_pic(AVSContext *h) {
                 decode_mb_i(h, mb_type - B_8X8 - 1);
             } else
                 decode_mb_b(h,mb_type);
-        } while(next_mb(h));
+        } while(ff_cavs_next_mb(h));
     }
  done:
     if(h->pic_type != FF_B_TYPE) {
@@ -621,7 +621,7 @@ static int cavs_decode_frame(AVCodecContext * avctx,void *data, int *data_size,
     const uint8_t *buf_end;
     const uint8_t *buf_ptr;
     AVFrame *picture = data;
-    uint32_t stc;
+    uint32_t stc = -1;
 
     s->avctx = avctx;