Browse code

ffv1: Add missing ff_ prefixes

Timothy Gu authored on 2015/08/22 10:14:12
Showing 4 changed files
... ...
@@ -39,7 +39,7 @@
39 39
 #include "mathops.h"
40 40
 #include "ffv1.h"
41 41
 
42
-av_cold int ffv1_common_init(AVCodecContext *avctx)
42
+av_cold int ff_ffv1_common_init(AVCodecContext *avctx)
43 43
 {
44 44
     FFV1Context *s = avctx->priv_data;
45 45
 
... ...
@@ -64,7 +64,7 @@ av_cold int ffv1_common_init(AVCodecContext *avctx)
64 64
     return 0;
65 65
 }
66 66
 
67
-av_cold int ffv1_init_slice_state(FFV1Context *f, FFV1Context *fs)
67
+av_cold int ff_ffv1_init_slice_state(FFV1Context *f, FFV1Context *fs)
68 68
 {
69 69
     int j;
70 70
 
... ...
@@ -98,18 +98,18 @@ av_cold int ffv1_init_slice_state(FFV1Context *f, FFV1Context *fs)
98 98
     return 0;
99 99
 }
100 100
 
101
-av_cold int ffv1_init_slices_state(FFV1Context *f)
101
+av_cold int ff_ffv1_init_slices_state(FFV1Context *f)
102 102
 {
103 103
     int i, ret;
104 104
     for (i = 0; i < f->slice_count; i++) {
105 105
         FFV1Context *fs = f->slice_context[i];
106
-        if ((ret = ffv1_init_slice_state(f, fs)) < 0)
106
+        if ((ret = ff_ffv1_init_slice_state(f, fs)) < 0)
107 107
             return AVERROR(ENOMEM);
108 108
     }
109 109
     return 0;
110 110
 }
111 111
 
112
-av_cold int ffv1_init_slice_contexts(FFV1Context *f)
112
+av_cold int ff_ffv1_init_slice_contexts(FFV1Context *f)
113 113
 {
114 114
     int i;
115 115
 
... ...
@@ -154,7 +154,7 @@ memfail:
154 154
     return AVERROR(ENOMEM);
155 155
 }
156 156
 
157
-int ffv1_allocate_initial_states(FFV1Context *f)
157
+int ff_ffv1_allocate_initial_states(FFV1Context *f)
158 158
 {
159 159
     int i;
160 160
 
... ...
@@ -169,7 +169,7 @@ int ffv1_allocate_initial_states(FFV1Context *f)
169 169
     return 0;
170 170
 }
171 171
 
172
-void ffv1_clear_slice_state(FFV1Context *f, FFV1Context *fs)
172
+void ff_ffv1_clear_slice_state(FFV1Context *f, FFV1Context *fs)
173 173
 {
174 174
     int i, j;
175 175
 
... ...
@@ -197,7 +197,7 @@ void ffv1_clear_slice_state(FFV1Context *f, FFV1Context *fs)
197 197
 }
198 198
 
199 199
 
200
-av_cold int ffv1_close(AVCodecContext *avctx)
200
+av_cold int ff_ffv1_close(AVCodecContext *avctx)
201 201
 {
202 202
     FFV1Context *s = avctx->priv_data;
203 203
     int i, j;
... ...
@@ -130,13 +130,13 @@ typedef struct FFV1Context {
130 130
     int slice_rct_ry_coef;
131 131
 } FFV1Context;
132 132
 
133
-int ffv1_common_init(AVCodecContext *avctx);
134
-int ffv1_init_slice_state(FFV1Context *f, FFV1Context *fs);
135
-int ffv1_init_slices_state(FFV1Context *f);
136
-int ffv1_init_slice_contexts(FFV1Context *f);
137
-int ffv1_allocate_initial_states(FFV1Context *f);
138
-void ffv1_clear_slice_state(FFV1Context *f, FFV1Context *fs);
139
-int ffv1_close(AVCodecContext *avctx);
133
+int ff_ffv1_common_init(AVCodecContext *avctx);
134
+int ff_ffv1_init_slice_state(FFV1Context *f, FFV1Context *fs);
135
+int ff_ffv1_init_slices_state(FFV1Context *f);
136
+int ff_ffv1_init_slice_contexts(FFV1Context *f);
137
+int ff_ffv1_allocate_initial_states(FFV1Context *f);
138
+void ff_ffv1_clear_slice_state(FFV1Context *f, FFV1Context *fs);
139
+int ff_ffv1_close(AVCodecContext *avctx);
140 140
 
141 141
 static av_always_inline int fold(int diff, int bits)
142 142
 {
... ...
@@ -402,17 +402,17 @@ static int decode_slice(AVCodecContext *c, void *arg)
402 402
     fs->slice_rct_ry_coef = 1;
403 403
 
404 404
     if (f->version > 2) {
405
-        if (ffv1_init_slice_state(f, fs) < 0)
405
+        if (ff_ffv1_init_slice_state(f, fs) < 0)
406 406
             return AVERROR(ENOMEM);
407 407
         if (decode_slice_header(f, fs) < 0) {
408 408
             fs->slice_damaged = 1;
409 409
             return AVERROR_INVALIDDATA;
410 410
         }
411 411
     }
412
-    if ((ret = ffv1_init_slice_state(f, fs)) < 0)
412
+    if ((ret = ff_ffv1_init_slice_state(f, fs)) < 0)
413 413
         return ret;
414 414
     if (f->cur->key_frame || fs->slice_reset_contexts)
415
-        ffv1_clear_slice_state(f, fs);
415
+        ff_ffv1_clear_slice_state(f, fs);
416 416
 
417 417
     width  = fs->slice_width;
418 418
     height = fs->slice_height;
... ...
@@ -571,7 +571,7 @@ static int read_extra_header(FFV1Context *f)
571 571
             return AVERROR_INVALIDDATA;
572 572
         }
573 573
     }
574
-    if ((ret = ffv1_allocate_initial_states(f)) < 0)
574
+    if ((ret = ff_ffv1_allocate_initial_states(f)) < 0)
575 575
         return ret;
576 576
 
577 577
     for (i = 0; i < f->quant_table_count; i++)
... ...
@@ -852,13 +852,13 @@ static av_cold int decode_init(AVCodecContext *avctx)
852 852
     FFV1Context *f = avctx->priv_data;
853 853
     int ret;
854 854
 
855
-    if ((ret = ffv1_common_init(avctx)) < 0)
855
+    if ((ret = ff_ffv1_common_init(avctx)) < 0)
856 856
         return ret;
857 857
 
858 858
     if (avctx->extradata && (ret = read_extra_header(f)) < 0)
859 859
         return ret;
860 860
 
861
-    if ((ret = ffv1_init_slice_contexts(f)) < 0)
861
+    if ((ret = ff_ffv1_init_slice_contexts(f)) < 0)
862 862
         return ret;
863 863
 
864 864
     avctx->internal->allocate_progress = 1;
... ...
@@ -1021,7 +1021,7 @@ static int init_thread_copy(AVCodecContext *avctx)
1021 1021
     f->picture.f      = av_frame_alloc();
1022 1022
     f->last_picture.f = av_frame_alloc();
1023 1023
 
1024
-    if ((ret = ffv1_init_slice_contexts(f)) < 0)
1024
+    if ((ret = ff_ffv1_init_slice_contexts(f)) < 0)
1025 1025
         return ret;
1026 1026
 
1027 1027
     return 0;
... ...
@@ -1106,7 +1106,7 @@ AVCodec ff_ffv1_decoder = {
1106 1106
     .id             = AV_CODEC_ID_FFV1,
1107 1107
     .priv_data_size = sizeof(FFV1Context),
1108 1108
     .init           = decode_init,
1109
-    .close          = ffv1_close,
1109
+    .close          = ff_ffv1_close,
1110 1110
     .decode         = decode_frame,
1111 1111
     .init_thread_copy = ONLY_IF_THREADS_ENABLED(init_thread_copy),
1112 1112
     .update_thread_context = ONLY_IF_THREADS_ENABLED(update_thread_context),
... ...
@@ -667,7 +667,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
667 667
     const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt);
668 668
     int i, j, k, m, ret;
669 669
 
670
-    if ((ret = ffv1_common_init(avctx)) < 0)
670
+    if ((ret = ff_ffv1_common_init(avctx)) < 0)
671 671
         return ret;
672 672
 
673 673
     s->version = 0;
... ...
@@ -851,7 +851,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
851 851
         p->context_count     = s->context_count[p->quant_table_index];
852 852
     }
853 853
 
854
-    if ((ret = ffv1_allocate_initial_states(s)) < 0)
854
+    if ((ret = ff_ffv1_allocate_initial_states(s)) < 0)
855 855
         return ret;
856 856
 
857 857
 #if FF_API_CODED_FRAME
... ...
@@ -975,9 +975,9 @@ slices_ok:
975 975
             return ret;
976 976
     }
977 977
 
978
-    if ((ret = ffv1_init_slice_contexts(s)) < 0)
978
+    if ((ret = ff_ffv1_init_slice_contexts(s)) < 0)
979 979
         return ret;
980
-    if ((ret = ffv1_init_slices_state(s)) < 0)
980
+    if ((ret = ff_ffv1_init_slices_state(s)) < 0)
981 981
         return ret;
982 982
 
983 983
 #define STATS_OUT_SIZE 1024 * 1024 * 6
... ...
@@ -1023,7 +1023,7 @@ static void encode_slice_header(FFV1Context *f, FFV1Context *fs)
1023 1023
     if (f->version > 3) {
1024 1024
         put_rac(c, state, fs->slice_coding_mode == 1);
1025 1025
         if (fs->slice_coding_mode == 1)
1026
-            ffv1_clear_slice_state(f, fs);
1026
+            ff_ffv1_clear_slice_state(f, fs);
1027 1027
         put_symbol(c, state, fs->slice_coding_mode, 0);
1028 1028
         if (fs->slice_coding_mode != 1) {
1029 1029
             put_symbol(c, state, fs->slice_rct_by_coef, 0);
... ...
@@ -1140,7 +1140,7 @@ static int encode_slice(AVCodecContext *c, void *arg)
1140 1140
 
1141 1141
 retry:
1142 1142
     if (f->key_frame)
1143
-        ffv1_clear_slice_state(f, fs);
1143
+        ff_ffv1_clear_slice_state(f, fs);
1144 1144
     if (f->version > 2) {
1145 1145
         encode_slice_header(f, fs);
1146 1146
     }
... ...
@@ -1337,7 +1337,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
1337 1337
 
1338 1338
 static av_cold int encode_close(AVCodecContext *avctx)
1339 1339
 {
1340
-    ffv1_close(avctx);
1340
+    ff_ffv1_close(avctx);
1341 1341
     return 0;
1342 1342
 }
1343 1343