[FFmpeg-soc] [soc]: r3783 - in dirac/libavcodec: dirac.c dirac.h diracdec.c

conrad subversion at mplayerhq.hu
Mon Nov 10 04:11:38 CET 2008


Author: conrad
Date: Mon Nov 10 04:11:37 2008
New Revision: 3783

Log:
Add ff_ to shared tables


Modified:
   dirac/libavcodec/dirac.c
   dirac/libavcodec/dirac.h
   dirac/libavcodec/diracdec.c

Modified: dirac/libavcodec/dirac.c
==============================================================================
--- dirac/libavcodec/dirac.c	(original)
+++ dirac/libavcodec/dirac.c	Mon Nov 10 04:11:37 2008
@@ -38,7 +38,7 @@
 #include "mpeg12data.h"
 
 /* Defaults for source parameters.  */
-const struct source_parameters dirac_source_parameters_defaults[] =
+const struct source_parameters ff_dirac_source_parameters_defaults[] =
 {
     { 640,  480,  2, 0, 0, 1,  1, 640,  480,  0, 0, 1, 0 },
     { 176,  120,  2, 0, 0, 9,  2, 176,  120,  0, 0, 1, 1 },
@@ -64,7 +64,7 @@ const struct source_parameters dirac_sou
     { 7680, 4320, 1, 0, 1, 6,  1, 3840, 2160, 0, 0, 3, 3 },
 };
 
-const AVRational dirac_preset_aspect_ratios[] =
+const AVRational ff_dirac_preset_aspect_ratios[] =
 {
     {1, 1},
     {10, 11},
@@ -80,10 +80,10 @@ const AVRational ff_dirac_frame_rate[] =
     {25, 2},
 };
 
-const uint16_t dirac_preset_luma_offset[]      = { 0,   16,  64,  256  };
-const uint16_t dirac_preset_luma_excursion[]   = { 255, 219, 876, 3504 };
-const uint16_t dirac_preset_chroma_offset[]    = { 128, 128, 512, 2048 };
-const uint16_t dirac_preset_chroma_excursion[] = { 255, 224, 896, 3584 };
+const uint16_t ff_dirac_preset_luma_offset[]      = { 0,   16,  64,  256  };
+const uint16_t ff_dirac_preset_luma_excursion[]   = { 255, 219, 876, 3504 };
+const uint16_t ff_dirac_preset_chroma_offset[]    = { 128, 128, 512, 2048 };
+const uint16_t ff_dirac_preset_chroma_excursion[] = { 255, 224, 896, 3584 };
 
 const color_specification ff_dirac_color_spec_presets[] = {
     { COLOR_PRIMARY_HDTV,     COLOR_MATRIX_HDTV, TRANSFER_FUNC_TV },
@@ -92,8 +92,8 @@ const color_specification ff_dirac_color
     { COLOR_PRIMARY_HDTV,     COLOR_MATRIX_HDTV, TRANSFER_FUNC_TV },
     { COLOR_PRIMARY_HDTV,     COLOR_MATRIX_HDTV, TRANSFER_FUNC_DCI_GAMMA },
 };
-const float dirac_preset_kr[] = { 0.2126, 0.299, 0 /* XXX */ };
-const float dirac_preset_kb[] = { 0.0722, 0.114, 0 /* XXX */ };
+const float ff_dirac_preset_kr[] = { 0.2126, 0.299, 0 /* XXX */ };
+const float ff_dirac_preset_kb[] = { 0.0722, 0.114, 0 /* XXX */ };
 
 /* Weights for qpel/eighth pel interpolation.  */
 typedef uint8_t weights_t[4];
@@ -170,7 +170,7 @@ void dirac_dump_source_parameters(AVCode
     dprintf(avctx, "-----------------------------------------------------\n");
 }
 
-struct dirac_arith_context_set dirac_context_set_split =
+struct dirac_arith_context_set ff_dirac_context_set_split =
     {
         .follow = { ARITH_CONTEXT_SB_F1, ARITH_CONTEXT_SB_F2,
                     ARITH_CONTEXT_SB_F2, ARITH_CONTEXT_SB_F2,
@@ -178,7 +178,7 @@ struct dirac_arith_context_set dirac_con
         .data = ARITH_CONTEXT_SB_DATA
     };
 
-struct dirac_arith_context_set dirac_context_set_mv =
+struct dirac_arith_context_set ff_dirac_context_set_mv =
     {
         .follow = { ARITH_CONTEXT_VECTOR_F1, ARITH_CONTEXT_VECTOR_F2,
                     ARITH_CONTEXT_VECTOR_F3, ARITH_CONTEXT_VECTOR_F4,
@@ -187,7 +187,7 @@ struct dirac_arith_context_set dirac_con
         .sign = ARITH_CONTEXT_VECTOR_SIGN
     };
 
-struct dirac_arith_context_set dirac_context_set_dc =
+struct dirac_arith_context_set ff_dirac_context_set_dc =
     {
         .follow = { ARITH_CONTEXT_DC_F1, ARITH_CONTEXT_DC_F2,
                     ARITH_CONTEXT_DC_F2, ARITH_CONTEXT_DC_F2,
@@ -196,7 +196,7 @@ struct dirac_arith_context_set dirac_con
         .sign = ARITH_CONTEXT_DC_SIGN
     };
 
-struct dirac_arith_context_set dirac_context_sets_waveletcoeff[] = {
+struct dirac_arith_context_set ff_dirac_context_sets_waveletcoeff[] = {
     {
         /* Parent = 0, Zero neighbourhood, sign predict 0 */
         .follow = { ARITH_CONTEXT_ZPZN_F1, ARITH_CONTEXT_ZP_F2,
@@ -291,7 +291,7 @@ struct dirac_arith_context_set dirac_con
     }
 };
 
-const struct dirac_block_params dirac_block_param_defaults[] = {
+const struct dirac_block_params ff_dirac_block_param_defaults[] = {
     {  8,  8,  4,  4 },
     { 12, 12,  8,  8 },
     { 16, 16, 12, 12 },

Modified: dirac/libavcodec/dirac.h
==============================================================================
--- dirac/libavcodec/dirac.h	(original)
+++ dirac/libavcodec/dirac.h	Mon Nov 10 04:11:37 2008
@@ -140,21 +140,21 @@ struct globalmc_parameters {
 };
 
 /* Defaults for sequence parameters.  */
-extern const struct source_parameters dirac_source_parameters_defaults[];
+extern const struct source_parameters ff_dirac_source_parameters_defaults[];
 extern const AVRational ff_dirac_frame_rate[];
-extern const AVRational dirac_preset_aspect_ratios[];
-extern const uint16_t dirac_preset_luma_offset[];
-extern const uint16_t dirac_preset_luma_excursion[];
-extern const uint16_t dirac_preset_chroma_offset[];
-extern const uint16_t dirac_preset_chroma_excursion[];
+extern const AVRational ff_dirac_preset_aspect_ratios[];
+extern const uint16_t ff_dirac_preset_luma_offset[];
+extern const uint16_t ff_dirac_preset_luma_excursion[];
+extern const uint16_t ff_dirac_preset_chroma_offset[];
+extern const uint16_t ff_dirac_preset_chroma_excursion[];
 extern const color_specification ff_dirac_color_spec_presets[];
-extern const float dirac_preset_kr[];
-extern const float dirac_preset_kb[];
+extern const float ff_dirac_preset_kr[];
+extern const float ff_dirac_preset_kb[];
 
-extern struct dirac_arith_context_set dirac_context_set_split;
-extern struct dirac_arith_context_set dirac_context_set_mv;
-extern struct dirac_arith_context_set dirac_context_set_dc;
-extern struct dirac_arith_context_set dirac_context_sets_waveletcoeff[];
+extern struct dirac_arith_context_set ff_dirac_context_set_split;
+extern struct dirac_arith_context_set ff_dirac_context_set_mv;
+extern struct dirac_arith_context_set ff_dirac_context_set_dc;
+extern struct dirac_arith_context_set ff_dirac_context_sets_waveletcoeff[];
 
 typedef int16_t vect_t[2];
 
@@ -427,7 +427,7 @@ struct dirac_block_params {
     int ybsep;
 };
 
-extern const struct dirac_block_params dirac_block_param_defaults[];
+extern const struct dirac_block_params ff_dirac_block_param_defaults[];
 
 static const int avgsplit[7] = { 0, 0, 1, 1, 1, 2, 2 };
 

Modified: dirac/libavcodec/diracdec.c
==============================================================================
--- dirac/libavcodec/diracdec.c	(original)
+++ dirac/libavcodec/diracdec.c	Mon Nov 10 04:11:37 2008
@@ -108,7 +108,7 @@ static int parse_source_parameters(Dirac
     }
     if (s->source.aspect_ratio_index > 0 && s->source.aspect_ratio_index <= 6)
         s->source.aspect_ratio =
-                   dirac_preset_aspect_ratios[s->source.aspect_ratio_index-1];
+                ff_dirac_preset_aspect_ratios[s->source.aspect_ratio_index-1];
 
     /* Override clean area.  */
     if (get_bits1(gb)) {
@@ -134,10 +134,10 @@ static int parse_source_parameters(Dirac
     }
     if (s->source.signal_range_index > 0 && s->source.signal_range_index <= 4) {
         int idx = s->source.signal_range_index - 1;
-        s->source.luma_offset      = dirac_preset_luma_offset     [idx];
-        s->source.luma_excursion   = dirac_preset_luma_excursion  [idx];
-        s->source.chroma_offset    = dirac_preset_chroma_offset   [idx];
-        s->source.chroma_excursion = dirac_preset_chroma_excursion[idx];
+        s->source.luma_offset      = ff_dirac_preset_luma_offset     [idx];
+        s->source.luma_excursion   = ff_dirac_preset_luma_excursion  [idx];
+        s->source.chroma_offset    = ff_dirac_preset_chroma_offset   [idx];
+        s->source.chroma_excursion = ff_dirac_preset_chroma_excursion[idx];
     }
 
     /* Color spec.  */
@@ -182,8 +182,8 @@ static int parse_source_parameters(Dirac
             }
         }
     }
-    s->source.k_r = dirac_preset_kr[s->source.color_spec_index];
-    s->source.k_b = dirac_preset_kb[s->source.color_spec_index];
+    s->source.k_r = ff_dirac_preset_kr[s->source.color_spec_index];
+    s->source.k_b = ff_dirac_preset_kb[s->source.color_spec_index];
 
     s->source.luma_depth   = av_log2(s->source.luma_excursion   + 1);
     s->source.chroma_depth = av_log2(s->source.chroma_excursion + 1);
@@ -222,7 +222,7 @@ static int parse_sequence_header(DiracCo
         return -1;
 
     /* Fill in defaults for the source parameters.  */
-    s->source = dirac_source_parameters_defaults[video_format];
+    s->source = ff_dirac_source_parameters_defaults[video_format];
 
     /* Override the defaults.  */
     if (parse_source_parameters(s))
@@ -296,7 +296,7 @@ static void coeff_unpack(DiracContext *s
     idx = parent * 6 + (!nhood) * 3;
     idx += sign_predict(s, coeffp, orientation, v, h);
 
-    context = &dirac_context_sets_waveletcoeff[idx];
+    context = &ff_dirac_context_sets_waveletcoeff[idx];
 
     coeff = dirac_arith_read_uint(&s->arith, context);
 
@@ -455,10 +455,10 @@ static int dirac_unpack_prediction_param
         s->frame_decoding.luma_xbsep = svq3_get_ue_golomb(gb);
         s->frame_decoding.luma_ybsep = svq3_get_ue_golomb(gb);
     } else {
-        s->frame_decoding.luma_xblen = dirac_block_param_defaults[idx - 1].xblen;
-        s->frame_decoding.luma_yblen = dirac_block_param_defaults[idx - 1].yblen;
-        s->frame_decoding.luma_xbsep = dirac_block_param_defaults[idx - 1].xbsep;
-        s->frame_decoding.luma_ybsep = dirac_block_param_defaults[idx - 1].ybsep;
+        s->frame_decoding.luma_xblen = ff_dirac_block_param_defaults[idx - 1].xblen;
+        s->frame_decoding.luma_yblen = ff_dirac_block_param_defaults[idx - 1].yblen;
+        s->frame_decoding.luma_xbsep = ff_dirac_block_param_defaults[idx - 1].xbsep;
+        s->frame_decoding.luma_ybsep = ff_dirac_block_param_defaults[idx - 1].ybsep;
     }
 
     /* Setup the blen and bsep parameters for the chroma
@@ -595,7 +595,7 @@ static void unpack_block_dc(DiracContext
         return;
     }
 
-    res = dirac_arith_read_int(&s->arith, &dirac_context_set_dc);
+    res = dirac_arith_read_int(&s->arith, &ff_dirac_context_set_dc);
     res += block_dc_prediction(s, x, y, comp);
 
     s->blmotion[y * s->blwidth + x].dc[comp] = res;
@@ -617,7 +617,7 @@ static void dirac_unpack_motion_vector(D
     if ((s->blmotion[y * s->blwidth + x].use_ref & refmask) != ref + 1)
         return;
 
-    res = dirac_arith_read_int(&s->arith, &dirac_context_set_mv);
+    res = dirac_arith_read_int(&s->arith, &ff_dirac_context_set_mv);
     res += motion_vector_prediction(s, x, y, ref, dir);
     s->blmotion[y * s->blwidth + x].vect[ref][dir] = res;
 }
@@ -693,7 +693,7 @@ static int dirac_unpack_prediction_data(
     dirac_arith_init(&s->arith, gb, length);
     for (y = 0; y < s->sbheight; y++)
         for (x = 0; x < s->sbwidth; x++) {
-            int res = dirac_arith_read_uint(&s->arith, &dirac_context_set_split);
+            int res = dirac_arith_read_uint(&s->arith, &ff_dirac_context_set_split);
             s->sbsplit[y * s->sbwidth + x] = (res +
                                               split_prediction(s, x, y));
             s->sbsplit[y * s->sbwidth + x] %= 3;



More information about the FFmpeg-soc mailing list