[FFmpeg-cvslog] r9222 - in trunk/libavcodec: msmpeg4.c wmv2.c

gpoirier subversion
Tue Jun 5 09:18:29 CEST 2007


Author: gpoirier
Date: Tue Jun  5 09:18:29 2007
New Revision: 9222

Log:
rename code012() to ff_code012(), and remove static qualifier: paves the way to vc1 encoder, as this function would be useful there
patch by Denis Fortin % fortin A nerim P net %
Original thread:
date: Jun 4, 2007 9:23 PM
subject: Re: [FFmpeg-devel] [RFC] move wmv2.c to its own file


Modified:
   trunk/libavcodec/msmpeg4.c
   trunk/libavcodec/wmv2.c

Modified: trunk/libavcodec/msmpeg4.c
==============================================================================
--- trunk/libavcodec/msmpeg4.c	(original)
+++ trunk/libavcodec/msmpeg4.c	Tue Jun  5 09:18:29 2007
@@ -162,7 +162,7 @@ static void init_mv_table(MVTable *tab)
     }
 }
 
-static void code012(PutBitContext *pb, int n)
+void ff_code012(PutBitContext *pb, int n)
 {
     if (n == 0) {
         put_bits(pb, 1, 0);
@@ -348,8 +348,8 @@ void msmpeg4_encode_picture_header(MpegE
 
         if(s->msmpeg4_version>2){
             if(!s->per_mb_rl_table){
-                code012(&s->pb, s->rl_chroma_table_index);
-                code012(&s->pb, s->rl_table_index);
+                ff_code012(&s->pb, s->rl_chroma_table_index);
+                ff_code012(&s->pb, s->rl_table_index);
             }
 
             put_bits(&s->pb, 1, s->dc_table_index);
@@ -362,7 +362,7 @@ void msmpeg4_encode_picture_header(MpegE
 
         if(s->msmpeg4_version>2){
             if(!s->per_mb_rl_table)
-                code012(&s->pb, s->rl_table_index);
+                ff_code012(&s->pb, s->rl_table_index);
 
             put_bits(&s->pb, 1, s->dc_table_index);
 

Modified: trunk/libavcodec/wmv2.c
==============================================================================
--- trunk/libavcodec/wmv2.c	(original)
+++ trunk/libavcodec/wmv2.c	Tue Jun  5 09:18:29 2007
@@ -144,8 +144,8 @@ int ff_wmv2_encode_picture_header(MpegEn
         if(w->per_mb_rl_bit) put_bits(&s->pb, 1, s->per_mb_rl_table);
 
         if(!s->per_mb_rl_table){
-            code012(&s->pb, s->rl_chroma_table_index);
-            code012(&s->pb, s->rl_table_index);
+            ff_code012(&s->pb, s->rl_chroma_table_index);
+            ff_code012(&s->pb, s->rl_table_index);
         }
 
         put_bits(&s->pb, 1, s->dc_table_index);
@@ -156,7 +156,7 @@ int ff_wmv2_encode_picture_header(MpegEn
 
         put_bits(&s->pb, 2, SKIP_TYPE_NONE);
 
-        code012(&s->pb, cbp_index=0);
+        ff_code012(&s->pb, cbp_index=0);
         if(s->qscale <= 10){
             int map[3]= {0,2,1};
             w->cbp_table_index= map[cbp_index];
@@ -173,14 +173,14 @@ int ff_wmv2_encode_picture_header(MpegEn
         if(w->abt_flag){
             put_bits(&s->pb, 1, w->per_mb_abt^1);
             if(!w->per_mb_abt){
-                code012(&s->pb, w->abt_type);
+                ff_code012(&s->pb, w->abt_type);
             }
         }
 
         if(w->per_mb_rl_bit) put_bits(&s->pb, 1, s->per_mb_rl_table);
 
         if(!s->per_mb_rl_table){
-            code012(&s->pb, s->rl_table_index);
+            ff_code012(&s->pb, s->rl_table_index);
             s->rl_chroma_table_index = s->rl_table_index;
         }
         put_bits(&s->pb, 1, s->dc_table_index);




More information about the ffmpeg-cvslog mailing list