Browse code

avcodec: av_log_missing_feature(1) ---> avpriv_request_sample()

Diego Biurrun authored on 2013/03/14 05:18:34
Showing 19 changed files
... ...
@@ -670,7 +670,7 @@ static int decode_ga_specific_config(AACContext *ac, AVCodecContext *avctx,
670 670
     int tags = 0;
671 671
 
672 672
     if (get_bits1(gb)) { // frameLengthFlag
673
-        av_log_missing_feature(avctx, "960/120 MDCT window", 1);
673
+        avpriv_request_sample(avctx, "960/120 MDCT window");
674 674
         return AVERROR_PATCHWELCOME;
675 675
     }
676 676
 
... ...
@@ -1660,7 +1660,7 @@ static int decode_ics(AACContext *ac, SingleChannelElement *sce,
1660 1660
         if ((tns->present = get_bits1(gb)) && decode_tns(ac, tns, gb, ics))
1661 1661
             return -1;
1662 1662
         if (get_bits1(gb)) {
1663
-            av_log_missing_feature(ac->avctx, "SSR", 1);
1663
+            avpriv_request_sample(ac->avctx, "SSR");
1664 1664
             return AVERROR_PATCHWELCOME;
1665 1665
         }
1666 1666
     }
... ...
@@ -2620,8 +2620,8 @@ static int latm_decode_audio_specific_config(struct LATMContext *latmctx,
2620 2620
         asclen         = get_bits_left(gb);
2621 2621
 
2622 2622
     if (config_start_bit % 8) {
2623
-        av_log_missing_feature(latmctx->aac_ctx.avctx,
2624
-                               "Non-byte-aligned audio-specific config", 1);
2623
+        avpriv_request_sample(latmctx->aac_ctx.avctx,
2624
+                              "Non-byte-aligned audio-specific config");
2625 2625
         return AVERROR_PATCHWELCOME;
2626 2626
     }
2627 2627
     if (asclen <= 0)
... ...
@@ -2675,8 +2675,7 @@ static int read_stream_mux_config(struct LATMContext *latmctx,
2675 2675
         skip_bits(gb, 6);                       // numSubFrames
2676 2676
         // numPrograms
2677 2677
         if (get_bits(gb, 4)) {                  // numPrograms
2678
-            av_log_missing_feature(latmctx->aac_ctx.avctx,
2679
-                                   "Multiple programs", 1);
2678
+            avpriv_request_sample(latmctx->aac_ctx.avctx, "Multiple programs");
2680 2679
             return AVERROR_PATCHWELCOME;
2681 2680
         }
2682 2681
 
... ...
@@ -2684,8 +2683,7 @@ static int read_stream_mux_config(struct LATMContext *latmctx,
2684 2684
 
2685 2685
         // for each layer (which there is only on in DVB)
2686 2686
         if (get_bits(gb, 3)) {                   // numLayer
2687
-            av_log_missing_feature(latmctx->aac_ctx.avctx,
2688
-                                   "Multiple layers", 1);
2687
+            avpriv_request_sample(latmctx->aac_ctx.avctx, "Multiple layers");
2689 2688
             return AVERROR_PATCHWELCOME;
2690 2689
         }
2691 2690
 
... ...
@@ -927,7 +927,7 @@ static void read_sbr_extension(AACContext *ac, SpectralBandReplication *sbr,
927 927
         }
928 928
         break;
929 929
     default:
930
-        av_log_missing_feature(ac->avctx, "Reserved SBR extensions", 1);
930
+        avpriv_request_sample(ac->avctx, "Reserved SBR extensions");
931 931
         skip_bits_long(gb, *num_bits_left); // bs_fill_bits
932 932
         *num_bits_left = 0;
933 933
         break;
... ...
@@ -874,7 +874,7 @@ static int decode_audio_block(AC3DecodeContext *s, int blk)
874 874
             /* check for enhanced coupling */
875 875
             if (s->eac3 && get_bits1(gbc)) {
876 876
                 /* TODO: parse enhanced coupling strategy info */
877
-                av_log_missing_feature(s->avctx, "Enhanced coupling", 1);
877
+                avpriv_request_sample(s->avctx, "Enhanced coupling");
878 878
                 return AVERROR_PATCHWELCOME;
879 879
             }
880 880
 
... ...
@@ -957,7 +957,7 @@ static int amrnb_decode_frame(AVCodecContext *avctx, void *data,
957 957
         return AVERROR_INVALIDDATA;
958 958
     }
959 959
     if (p->cur_frame_mode == MODE_DTX) {
960
-        av_log_missing_feature(avctx, "dtx mode", 1);
960
+        avpriv_request_sample(avctx, "dtx mode");
961 961
         return AVERROR_PATCHWELCOME;
962 962
     }
963 963
 
... ...
@@ -1117,7 +1117,7 @@ static int amrwb_decode_frame(AVCodecContext *avctx, void *data,
1117 1117
         av_log(avctx, AV_LOG_ERROR, "Encountered a bad or corrupted frame\n");
1118 1118
 
1119 1119
     if (ctx->fr_cur_mode == MODE_SID) { /* Comfort noise frame */
1120
-        av_log_missing_feature(avctx, "SID mode", 1);
1120
+        avpriv_request_sample(avctx, "SID mode");
1121 1121
         return AVERROR_PATCHWELCOME;
1122 1122
     }
1123 1123
 
... ...
@@ -300,7 +300,7 @@ int ff_eac3_parse_header(AC3DecodeContext *s)
300 300
        application can select from. each independent stream can also contain
301 301
        dependent streams which are used to add or replace channels. */
302 302
     if (s->frame_type == EAC3_FRAME_TYPE_DEPENDENT) {
303
-        av_log_missing_feature(s->avctx, "Dependent substream decoding", 1);
303
+        avpriv_request_sample(s->avctx, "Dependent substream decoding");
304 304
         return AAC_AC3_PARSE_ERROR_FRAME_TYPE;
305 305
     } else if (s->frame_type == EAC3_FRAME_TYPE_RESERVED) {
306 306
         av_log(s->avctx, AV_LOG_ERROR, "Reserved frame type\n");
... ...
@@ -312,7 +312,7 @@ int ff_eac3_parse_header(AC3DecodeContext *s)
312 312
        associated to an independent stream have matching substream id's. */
313 313
     if (s->substreamid) {
314 314
         /* only decode substream with id=0. skip any additional substreams. */
315
-        av_log_missing_feature(s->avctx, "Additional substreams", 1);
315
+        avpriv_request_sample(s->avctx, "Additional substreams");
316 316
         return AAC_AC3_PARSE_ERROR_FRAME_TYPE;
317 317
     }
318 318
 
... ...
@@ -321,7 +321,7 @@ int ff_eac3_parse_header(AC3DecodeContext *s)
321 321
            rates in bit allocation.  The best assumption would be that it is
322 322
            handled like AC-3 DolbyNet, but we cannot be sure until we have a
323 323
            sample which utilizes this feature. */
324
-        av_log_missing_feature(s->avctx, "Reduced sampling rate", 1);
324
+        avpriv_request_sample(s->avctx, "Reduced sampling rate");
325 325
         return AVERROR_PATCHWELCOME;
326 326
     }
327 327
     skip_bits(gbc, 5); // skip bitstream id
... ...
@@ -593,7 +593,7 @@ int ff_eac3_parse_header(AC3DecodeContext *s)
593 593
            It is likely the offset of each block within the frame. */
594 594
         int block_start_bits = (s->num_blocks-1) * (4 + av_log2(s->frame_size-2));
595 595
         skip_bits_long(gbc, block_start_bits);
596
-        av_log_missing_feature(s->avctx, "Block start info", 1);
596
+        avpriv_request_sample(s->avctx, "Block start info");
597 597
     }
598 598
 
599 599
     /* syntax state initialization */
... ...
@@ -259,11 +259,11 @@ static int flashsv_decode_frame(AVCodecContext *avctx, void *data,
259 259
     if (s->ver == 2) {
260 260
         skip_bits(&gb, 6);
261 261
         if (get_bits1(&gb)) {
262
-            av_log_missing_feature(avctx, "iframe", 1);
262
+            avpriv_request_sample(avctx, "iframe");
263 263
             return AVERROR_PATCHWELCOME;
264 264
         }
265 265
         if (get_bits1(&gb)) {
266
-            av_log_missing_feature(avctx, "Custom palette", 1);
266
+            avpriv_request_sample(avctx, "Custom palette");
267 267
             return AVERROR_PATCHWELCOME;
268 268
         }
269 269
     }
... ...
@@ -394,7 +394,7 @@ static int flashsv_decode_frame(AVCodecContext *avctx, void *data,
394 394
                     int row = get_bits(&gb, 8);
395 395
                     av_log(avctx, AV_LOG_DEBUG, "%dx%d zlibprime_curr %dx%d\n", i, j, col, row);
396 396
                     size -= 2;
397
-                    av_log_missing_feature(avctx, "zlibprime_curr", 1);
397
+                    avpriv_request_sample(avctx, "zlibprime_curr");
398 398
                     return AVERROR_PATCHWELCOME;
399 399
                 }
400 400
                 if (!s->blocks && (s->zlibprime_curr || s->zlibprime_prev)) {
... ...
@@ -2884,8 +2884,8 @@ static int h264_set_parameter_from_sps(H264Context *h)
2884 2884
         h->avctx->has_b_frames = !h->low_delay;
2885 2885
 
2886 2886
     if (h->sps.bit_depth_luma != h->sps.bit_depth_chroma) {
2887
-        av_log_missing_feature(h->avctx,
2888
-            "Different bit depth between chroma and luma", 1);
2887
+        avpriv_request_sample(h->avctx,
2888
+                              "Different chroma and luma bit depth");
2889 2889
         return AVERROR_PATCHWELCOME;
2890 2890
     }
2891 2891
 
... ...
@@ -389,7 +389,7 @@ static int mimic_decode_frame(AVCodecContext *avctx, void *data,
389 389
             ctx->num_hblocks[i] =     width   >> (3 + !!i);
390 390
         }
391 391
     } else if (width != ctx->avctx->width || height != ctx->avctx->height) {
392
-        av_log_missing_feature(avctx, "resolution changing", 1);
392
+        avpriv_request_sample(avctx, "Resolution changing");
393 393
         return AVERROR_PATCHWELCOME;
394 394
     }
395 395
 
... ...
@@ -130,7 +130,7 @@ static av_cold int mpc8_decode_init(AVCodecContext * avctx)
130 130
     c->maxbands = get_bits(&gb, 5) + 1;
131 131
     channels = get_bits(&gb, 4) + 1;
132 132
     if (channels > 2) {
133
-        av_log_missing_feature(avctx, "Multichannel MPC SV8", 1);
133
+        avpriv_request_sample(avctx, "Multichannel MPC SV8");
134 134
         return AVERROR_PATCHWELCOME;
135 135
     }
136 136
     c->MSS = get_bits1(&gb);
... ...
@@ -459,7 +459,7 @@ static av_cold int rv10_decode_init(AVCodecContext *avctx)
459 459
         break;
460 460
     default:
461 461
         av_log(s->avctx, AV_LOG_ERROR, "unknown header %X\n", rv->sub_id);
462
-        av_log_missing_feature(avctx, "RV1/2 version", 1);
462
+        avpriv_request_sample(avctx, "RV1/2 version");
463 463
         return AVERROR_PATCHWELCOME;
464 464
     }
465 465
 
... ...
@@ -402,7 +402,7 @@ static void smc_decode_stream(SmcContext *s)
402 402
             break;
403 403
 
404 404
         case 0xF0:
405
-            av_log_missing_feature(s->avctx, "0xF0 opcode", 1);
405
+            avpriv_request_sample(s->avctx, "0xF0 opcode");
406 406
             break;
407 407
         }
408 408
     }
... ...
@@ -685,7 +685,7 @@ static int tak_decode_frame(AVCodecContext *avctx, void *data,
685 685
         return ret;
686 686
 
687 687
     if (s->ti.flags & TAK_FRAME_FLAG_HAS_METADATA) {
688
-        av_log_missing_feature(avctx, "frame metadata", 1);
688
+        avpriv_request_sample(avctx, "Frame metadata");
689 689
         return AVERROR_PATCHWELCOME;
690 690
     }
691 691
 
... ...
@@ -226,7 +226,7 @@ static inline int tm2_read_header(TM2Context *ctx, const uint8_t *buf)
226 226
 
227 227
     switch (magic) {
228 228
     case TM2_OLD_HEADER_MAGIC:
229
-        av_log_missing_feature(ctx->avctx, "TM2 old header", 1);
229
+        avpriv_request_sample(ctx->avctx, "Old TM2 header");
230 230
         return 0;
231 231
     case TM2_NEW_HEADER_MAGIC:
232 232
         return 0;
... ...
@@ -222,7 +222,7 @@ static av_cold int tta_decode_init(AVCodecContext * avctx)
222 222
             return -1;
223 223
         }
224 224
         if (s->format == FORMAT_ENCRYPTED) {
225
-            av_report_missing_feature(s->avctx, "Encrypted TTA");
225
+            avpriv_report_missing_feature(s->avctx, "Encrypted TTA");
226 226
             return AVERROR_PATCHWELCOME;
227 227
         }
228 228
         avctx->channels = s->channels = get_bits(&s->gb, 16);
... ...
@@ -337,7 +337,7 @@ static int decode_frame_header(VP8Context *s, const uint8_t *buf, int buf_size)
337 337
         buf_size -= 7;
338 338
 
339 339
         if (hscale || vscale)
340
-            av_log_missing_feature(s->avctx, "Upscaling", 1);
340
+            avpriv_request_sample(s->avctx, "Upscaling");
341 341
 
342 342
         s->update_golden = s->update_altref = VP56_FRAME_CURRENT;
343 343
         for (i = 0; i < 4; i++)
... ...
@@ -886,7 +886,7 @@ static int decode_subframe(WmallDecodeCtx *s)
886 886
 
887 887
         s->do_arith_coding    = get_bits1(&s->gb);
888 888
         if (s->do_arith_coding) {
889
-            av_log_missing_feature(s->avctx, "Arithmetic coding", 1);
889
+            avpriv_request_sample(s->avctx, "Arithmetic coding");
890 890
             return AVERROR_PATCHWELCOME;
891 891
         }
892 892
         s->do_ac_filter       = get_bits1(&s->gb);
... ...
@@ -1191,7 +1191,7 @@ static int decode_packet(AVCodecContext *avctx, void *data, int *got_frame_ptr,
1191 1191
         skip_bits(gb, 1);   // Skip seekable_frame_in_packet, currently ununused
1192 1192
         spliced_packet = get_bits1(gb);
1193 1193
         if (spliced_packet)
1194
-            av_log_missing_feature(avctx, "Bitstream splicing", 1);
1194
+            avpriv_request_sample(avctx, "Bitstream splicing");
1195 1195
 
1196 1196
         /* get number of bits that need to be added to the previous frame */
1197 1197
         num_bits_prev_frame = get_bits(gb, s->log2_frame_size);
... ...
@@ -314,7 +314,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
314 314
     /** get frame len */
315 315
     bits = ff_wma_get_frame_len_bits(avctx->sample_rate, 3, s->decode_flags);
316 316
     if (bits > WMAPRO_BLOCK_MAX_BITS) {
317
-        av_log_missing_feature(avctx, "14-bits block sizes", 1);
317
+        avpriv_request_sample(avctx, "14-bit block sizes");
318 318
         return AVERROR_PATCHWELCOME;
319 319
     }
320 320
     s->samples_per_frame = 1 << bits;
... ...
@@ -1765,7 +1765,7 @@ static int synth_superframe(AVCodecContext *ctx, AVFrame *frame,
1765 1765
      * are really WMAPro-in-WMAVoice-superframes. I've never seen those in
1766 1766
      * the wild yet. */
1767 1767
     if (!get_bits1(gb)) {
1768
-        av_log_missing_feature(ctx, "WMAPro-in-WMAVoice", 1);
1768
+        avpriv_request_sample(ctx, "WMAPro-in-WMAVoice");
1769 1769
         return AVERROR_PATCHWELCOME;
1770 1770
     }
1771 1771