[FFmpeg-cvslog] r21861 - in trunk/libavcodec: h264.c h264.h

michael subversion
Wed Feb 17 03:25:05 CET 2010


Author: michael
Date: Wed Feb 17 03:25:05 2010
New Revision: 21861

Log:
Move predict_field_decoding_flag() from h264.h to .c as its only used there and belongs
there as well.

Modified:
   trunk/libavcodec/h264.c
   trunk/libavcodec/h264.h

Modified: trunk/libavcodec/h264.c
==============================================================================
--- trunk/libavcodec/h264.c	Wed Feb 17 03:14:02 2010	(r21860)
+++ trunk/libavcodec/h264.c	Wed Feb 17 03:25:05 2010	(r21861)
@@ -2200,6 +2200,17 @@ static void loop_filter(H264Context *h){
     h->chroma_qp[1] = get_chroma_qp(h, 1, s->qscale);
 }
 
+static void predict_field_decoding_flag(H264Context *h){
+    MpegEncContext * const s = &h->s;
+    const int mb_xy= s->mb_x + s->mb_y*s->mb_stride;
+    int mb_type = (h->slice_table[mb_xy-1] == h->slice_num)
+                ? s->current_picture.mb_type[mb_xy-1]
+                : (h->slice_table[mb_xy-s->mb_stride] == h->slice_num)
+                ? s->current_picture.mb_type[mb_xy-s->mb_stride]
+                : 0;
+    h->mb_mbaff = h->mb_field_decoding_flag = IS_INTERLACED(mb_type) ? 1 : 0;
+}
+
 static int decode_slice(struct AVCodecContext *avctx, void *arg){
     H264Context *h = *(void**)arg;
     MpegEncContext * const s = &h->s;

Modified: trunk/libavcodec/h264.h
==============================================================================
--- trunk/libavcodec/h264.h	Wed Feb 17 03:14:02 2010	(r21860)
+++ trunk/libavcodec/h264.h	Wed Feb 17 03:25:05 2010	(r21861)
@@ -1451,17 +1451,6 @@ static inline int get_dct8x8_allowed(H26
         return !(*(uint64_t*)h->sub_mb_type & ((MB_TYPE_16x8|MB_TYPE_8x16|MB_TYPE_8x8|MB_TYPE_DIRECT2)*0x0001000100010001ULL));
 }
 
-static void predict_field_decoding_flag(H264Context *h){
-    MpegEncContext * const s = &h->s;
-    const int mb_xy= s->mb_x + s->mb_y*s->mb_stride;
-    int mb_type = (h->slice_table[mb_xy-1] == h->slice_num)
-                ? s->current_picture.mb_type[mb_xy-1]
-                : (h->slice_table[mb_xy-s->mb_stride] == h->slice_num)
-                ? s->current_picture.mb_type[mb_xy-s->mb_stride]
-                : 0;
-    h->mb_mbaff = h->mb_field_decoding_flag = IS_INTERLACED(mb_type) ? 1 : 0;
-}
-
 /**
  * decodes a P_SKIP or B_SKIP macroblock
  */



More information about the ffmpeg-cvslog mailing list