1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

Merge remote-tracking branch 'qatar/master'

* qatar/master:
  avcodec: av_log_missing_feature(1) ---> avpriv_request_sample()

Conflicts:
	libavcodec/aacsbr.c
	libavcodec/amrnbdec.c
	libavcodec/takdec.c
	libavcodec/tta.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-03-14 13:07:25 +01:00
commit cacbf64a76
17 changed files with 29 additions and 31 deletions

View File

@ -709,7 +709,7 @@ static int decode_ga_specific_config(AACContext *ac, AVCodecContext *avctx,
int tags = 0; int tags = 0;
if (get_bits1(gb)) { // frameLengthFlag if (get_bits1(gb)) { // frameLengthFlag
av_log_missing_feature(avctx, "960/120 MDCT window", 1); avpriv_request_sample(avctx, "960/120 MDCT window");
return AVERROR_PATCHWELCOME; return AVERROR_PATCHWELCOME;
} }
@ -1713,7 +1713,7 @@ static int decode_ics(AACContext *ac, SingleChannelElement *sce,
if ((tns->present = get_bits1(gb)) && decode_tns(ac, tns, gb, ics)) if ((tns->present = get_bits1(gb)) && decode_tns(ac, tns, gb, ics))
return -1; return -1;
if (get_bits1(gb)) { if (get_bits1(gb)) {
av_log_missing_feature(ac->avctx, "SSR", 1); avpriv_request_sample(ac->avctx, "SSR");
return AVERROR_PATCHWELCOME; return AVERROR_PATCHWELCOME;
} }
} }
@ -2750,8 +2750,8 @@ static int latm_decode_audio_specific_config(struct LATMContext *latmctx,
asclen = get_bits_left(gb); asclen = get_bits_left(gb);
if (config_start_bit % 8) { if (config_start_bit % 8) {
av_log_missing_feature(latmctx->aac_ctx.avctx, avpriv_request_sample(latmctx->aac_ctx.avctx,
"Non-byte-aligned audio-specific config", 1); "Non-byte-aligned audio-specific config");
return AVERROR_PATCHWELCOME; return AVERROR_PATCHWELCOME;
} }
if (asclen <= 0) if (asclen <= 0)
@ -2810,8 +2810,7 @@ static int read_stream_mux_config(struct LATMContext *latmctx,
skip_bits(gb, 6); // numSubFrames skip_bits(gb, 6); // numSubFrames
// numPrograms // numPrograms
if (get_bits(gb, 4)) { // numPrograms if (get_bits(gb, 4)) { // numPrograms
av_log_missing_feature(latmctx->aac_ctx.avctx, avpriv_request_sample(latmctx->aac_ctx.avctx, "Multiple programs");
"Multiple programs", 1);
return AVERROR_PATCHWELCOME; return AVERROR_PATCHWELCOME;
} }
@ -2819,8 +2818,7 @@ static int read_stream_mux_config(struct LATMContext *latmctx,
// for each layer (which there is only one in DVB) // for each layer (which there is only one in DVB)
if (get_bits(gb, 3)) { // numLayer if (get_bits(gb, 3)) { // numLayer
av_log_missing_feature(latmctx->aac_ctx.avctx, avpriv_request_sample(latmctx->aac_ctx.avctx, "Multiple layers");
"Multiple layers", 1);
return AVERROR_PATCHWELCOME; return AVERROR_PATCHWELCOME;
} }

View File

@ -942,7 +942,7 @@ static void read_sbr_extension(AACContext *ac, SpectralBandReplication *sbr,
default: default:
// some files contain 0-padding // some files contain 0-padding
if (bs_extension_id || *num_bits_left > 16 || show_bits(gb, *num_bits_left)) if (bs_extension_id || *num_bits_left > 16 || show_bits(gb, *num_bits_left))
av_log_missing_feature(ac->avctx, "Reserved SBR extensions", 1); avpriv_request_sample(ac->avctx, "Reserved SBR extensions");
skip_bits_long(gb, *num_bits_left); // bs_fill_bits skip_bits_long(gb, *num_bits_left); // bs_fill_bits
*num_bits_left = 0; *num_bits_left = 0;
break; break;

View File

@ -874,7 +874,7 @@ static int decode_audio_block(AC3DecodeContext *s, int blk)
/* check for enhanced coupling */ /* check for enhanced coupling */
if (s->eac3 && get_bits1(gbc)) { if (s->eac3 && get_bits1(gbc)) {
/* TODO: parse enhanced coupling strategy info */ /* TODO: parse enhanced coupling strategy info */
av_log_missing_feature(s->avctx, "Enhanced coupling", 1); avpriv_request_sample(s->avctx, "Enhanced coupling");
return AVERROR_PATCHWELCOME; return AVERROR_PATCHWELCOME;
} }

View File

@ -973,7 +973,7 @@ static int amrnb_decode_frame(AVCodecContext *avctx, void *data,
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
} }
if (p->cur_frame_mode == MODE_DTX) { if (p->cur_frame_mode == MODE_DTX) {
av_log_missing_feature(avctx, "dtx mode", 0); avpriv_report_missing_feature(avctx, "dtx mode");
av_log(avctx, AV_LOG_INFO, "Note: libopencore_amrnb supports dtx\n"); av_log(avctx, AV_LOG_INFO, "Note: libopencore_amrnb supports dtx\n");
return AVERROR_PATCHWELCOME; return AVERROR_PATCHWELCOME;
} }

View File

@ -1135,7 +1135,7 @@ static int amrwb_decode_frame(AVCodecContext *avctx, void *data,
av_log(avctx, AV_LOG_ERROR, "Encountered a bad or corrupted frame\n"); av_log(avctx, AV_LOG_ERROR, "Encountered a bad or corrupted frame\n");
if (ctx->fr_cur_mode == MODE_SID) { /* Comfort noise frame */ if (ctx->fr_cur_mode == MODE_SID) { /* Comfort noise frame */
av_log_missing_feature(avctx, "SID mode", 1); avpriv_request_sample(avctx, "SID mode");
return AVERROR_PATCHWELCOME; return AVERROR_PATCHWELCOME;
} }

View File

@ -300,7 +300,7 @@ int ff_eac3_parse_header(AC3DecodeContext *s)
application can select from. each independent stream can also contain application can select from. each independent stream can also contain
dependent streams which are used to add or replace channels. */ dependent streams which are used to add or replace channels. */
if (s->frame_type == EAC3_FRAME_TYPE_DEPENDENT) { if (s->frame_type == EAC3_FRAME_TYPE_DEPENDENT) {
av_log_missing_feature(s->avctx, "Dependent substream decoding", 1); avpriv_request_sample(s->avctx, "Dependent substream decoding");
return AAC_AC3_PARSE_ERROR_FRAME_TYPE; return AAC_AC3_PARSE_ERROR_FRAME_TYPE;
} else if (s->frame_type == EAC3_FRAME_TYPE_RESERVED) { } else if (s->frame_type == EAC3_FRAME_TYPE_RESERVED) {
av_log(s->avctx, AV_LOG_ERROR, "Reserved frame type\n"); av_log(s->avctx, AV_LOG_ERROR, "Reserved frame type\n");
@ -312,7 +312,7 @@ int ff_eac3_parse_header(AC3DecodeContext *s)
associated to an independent stream have matching substream id's. */ associated to an independent stream have matching substream id's. */
if (s->substreamid) { if (s->substreamid) {
/* only decode substream with id=0. skip any additional substreams. */ /* only decode substream with id=0. skip any additional substreams. */
av_log_missing_feature(s->avctx, "Additional substreams", 1); avpriv_request_sample(s->avctx, "Additional substreams");
return AAC_AC3_PARSE_ERROR_FRAME_TYPE; return AAC_AC3_PARSE_ERROR_FRAME_TYPE;
} }
@ -321,7 +321,7 @@ int ff_eac3_parse_header(AC3DecodeContext *s)
rates in bit allocation. The best assumption would be that it is rates in bit allocation. The best assumption would be that it is
handled like AC-3 DolbyNet, but we cannot be sure until we have a handled like AC-3 DolbyNet, but we cannot be sure until we have a
sample which utilizes this feature. */ sample which utilizes this feature. */
av_log_missing_feature(s->avctx, "Reduced sampling rate", 1); avpriv_request_sample(s->avctx, "Reduced sampling rate");
return AVERROR_PATCHWELCOME; return AVERROR_PATCHWELCOME;
} }
skip_bits(gbc, 5); // skip bitstream id skip_bits(gbc, 5); // skip bitstream id
@ -593,7 +593,7 @@ int ff_eac3_parse_header(AC3DecodeContext *s)
It is likely the offset of each block within the frame. */ It is likely the offset of each block within the frame. */
int block_start_bits = (s->num_blocks-1) * (4 + av_log2(s->frame_size-2)); int block_start_bits = (s->num_blocks-1) * (4 + av_log2(s->frame_size-2));
skip_bits_long(gbc, block_start_bits); skip_bits_long(gbc, block_start_bits);
av_log_missing_feature(s->avctx, "Block start info", 1); avpriv_request_sample(s->avctx, "Block start info");
} }
/* syntax state initialization */ /* syntax state initialization */

View File

@ -269,11 +269,11 @@ static int flashsv_decode_frame(AVCodecContext *avctx, void *data,
if (s->ver == 2) { if (s->ver == 2) {
skip_bits(&gb, 6); skip_bits(&gb, 6);
if (get_bits1(&gb)) { if (get_bits1(&gb)) {
av_log_missing_feature(avctx, "iframe", 1); avpriv_request_sample(avctx, "iframe");
return AVERROR_PATCHWELCOME; return AVERROR_PATCHWELCOME;
} }
if (get_bits1(&gb)) { if (get_bits1(&gb)) {
av_log_missing_feature(avctx, "Custom palette", 1); avpriv_request_sample(avctx, "Custom palette");
return AVERROR_PATCHWELCOME; return AVERROR_PATCHWELCOME;
} }
} }
@ -401,7 +401,7 @@ static int flashsv_decode_frame(AVCodecContext *avctx, void *data,
int row = get_bits(&gb, 8); int row = get_bits(&gb, 8);
av_log(avctx, AV_LOG_DEBUG, "%dx%d zlibprime_curr %dx%d\n", i, j, col, row); av_log(avctx, AV_LOG_DEBUG, "%dx%d zlibprime_curr %dx%d\n", i, j, col, row);
size -= 2; size -= 2;
av_log_missing_feature(avctx, "zlibprime_curr", 1); avpriv_request_sample(avctx, "zlibprime_curr");
return AVERROR_PATCHWELCOME; return AVERROR_PATCHWELCOME;
} }
if (!s->blocks && (s->zlibprime_curr || s->zlibprime_prev)) { if (!s->blocks && (s->zlibprime_curr || s->zlibprime_prev)) {

View File

@ -2945,8 +2945,8 @@ static int h264_set_parameter_from_sps(H264Context *h)
h->avctx->has_b_frames = !h->low_delay; h->avctx->has_b_frames = !h->low_delay;
if (h->sps.bit_depth_luma != h->sps.bit_depth_chroma) { if (h->sps.bit_depth_luma != h->sps.bit_depth_chroma) {
av_log_missing_feature(h->avctx, avpriv_request_sample(h->avctx,
"Different bit depth between chroma and luma", 1); "Different chroma and luma bit depth");
return AVERROR_PATCHWELCOME; return AVERROR_PATCHWELCOME;
} }

View File

@ -392,7 +392,7 @@ static int mimic_decode_frame(AVCodecContext *avctx, void *data,
ctx->num_hblocks[i] = width >> (3 + !!i); ctx->num_hblocks[i] = width >> (3 + !!i);
} }
} else if (width != ctx->avctx->width || height != ctx->avctx->height) { } else if (width != ctx->avctx->width || height != ctx->avctx->height) {
av_log_missing_feature(avctx, "resolution changing", 1); avpriv_request_sample(avctx, "Resolution changing");
return AVERROR_PATCHWELCOME; return AVERROR_PATCHWELCOME;
} }

View File

@ -134,7 +134,7 @@ static av_cold int mpc8_decode_init(AVCodecContext * avctx)
} }
channels = get_bits(&gb, 4) + 1; channels = get_bits(&gb, 4) + 1;
if (channels > 2) { if (channels > 2) {
av_log_missing_feature(avctx, "Multichannel MPC SV8", 1); avpriv_request_sample(avctx, "Multichannel MPC SV8");
return AVERROR_PATCHWELCOME; return AVERROR_PATCHWELCOME;
} }
c->MSS = get_bits1(&gb); c->MSS = get_bits1(&gb);

View File

@ -493,7 +493,7 @@ static av_cold int rv10_decode_init(AVCodecContext *avctx)
break; break;
default: default:
av_log(s->avctx, AV_LOG_ERROR, "unknown header %X\n", rv->sub_id); av_log(s->avctx, AV_LOG_ERROR, "unknown header %X\n", rv->sub_id);
av_log_missing_feature(avctx, "RV1/2 version", 1); avpriv_request_sample(avctx, "RV1/2 version");
return AVERROR_PATCHWELCOME; return AVERROR_PATCHWELCOME;
} }

View File

@ -402,7 +402,7 @@ static void smc_decode_stream(SmcContext *s)
break; break;
case 0xF0: case 0xF0:
av_log_missing_feature(s->avctx, "0xF0 opcode", 1); avpriv_request_sample(s->avctx, "0xF0 opcode");
break; break;
} }
} }

View File

@ -231,7 +231,7 @@ static inline int tm2_read_header(TM2Context *ctx, const uint8_t *buf)
switch (magic) { switch (magic) {
case TM2_OLD_HEADER_MAGIC: case TM2_OLD_HEADER_MAGIC:
av_log_missing_feature(ctx->avctx, "TM2 old header", 1); avpriv_request_sample(ctx->avctx, "Old TM2 header");
return 0; return 0;
case TM2_NEW_HEADER_MAGIC: case TM2_NEW_HEADER_MAGIC:
return 0; return 0;

View File

@ -337,7 +337,7 @@ static int decode_frame_header(VP8Context *s, const uint8_t *buf, int buf_size)
buf_size -= 7; buf_size -= 7;
if (hscale || vscale) if (hscale || vscale)
av_log_missing_feature(s->avctx, "Upscaling", 1); avpriv_request_sample(s->avctx, "Upscaling");
s->update_golden = s->update_altref = VP56_FRAME_CURRENT; s->update_golden = s->update_altref = VP56_FRAME_CURRENT;
for (i = 0; i < 4; i++) for (i = 0; i < 4; i++)

View File

@ -886,7 +886,7 @@ static int decode_subframe(WmallDecodeCtx *s)
s->do_arith_coding = get_bits1(&s->gb); s->do_arith_coding = get_bits1(&s->gb);
if (s->do_arith_coding) { if (s->do_arith_coding) {
av_log_missing_feature(s->avctx, "Arithmetic coding", 1); avpriv_request_sample(s->avctx, "Arithmetic coding");
return AVERROR_PATCHWELCOME; return AVERROR_PATCHWELCOME;
} }
s->do_ac_filter = get_bits1(&s->gb); s->do_ac_filter = get_bits1(&s->gb);
@ -1189,7 +1189,7 @@ static int decode_packet(AVCodecContext *avctx, void *data, int *got_frame_ptr,
skip_bits(gb, 1); // Skip seekable_frame_in_packet, currently ununused skip_bits(gb, 1); // Skip seekable_frame_in_packet, currently ununused
spliced_packet = get_bits1(gb); spliced_packet = get_bits1(gb);
if (spliced_packet) if (spliced_packet)
av_log_missing_feature(avctx, "Bitstream splicing", 1); avpriv_request_sample(avctx, "Bitstream splicing");
/* get number of bits that need to be added to the previous frame */ /* get number of bits that need to be added to the previous frame */
num_bits_prev_frame = get_bits(gb, s->log2_frame_size); num_bits_prev_frame = get_bits(gb, s->log2_frame_size);

View File

@ -314,7 +314,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
/** get frame len */ /** get frame len */
bits = ff_wma_get_frame_len_bits(avctx->sample_rate, 3, s->decode_flags); bits = ff_wma_get_frame_len_bits(avctx->sample_rate, 3, s->decode_flags);
if (bits > WMAPRO_BLOCK_MAX_BITS) { if (bits > WMAPRO_BLOCK_MAX_BITS) {
av_log_missing_feature(avctx, "14-bits block sizes", 1); avpriv_request_sample(avctx, "14-bit block sizes");
return AVERROR_PATCHWELCOME; return AVERROR_PATCHWELCOME;
} }
s->samples_per_frame = 1 << bits; s->samples_per_frame = 1 << bits;

View File

@ -1763,7 +1763,7 @@ static int synth_superframe(AVCodecContext *ctx, AVFrame *frame,
* are really WMAPro-in-WMAVoice-superframes. I've never seen those in * are really WMAPro-in-WMAVoice-superframes. I've never seen those in
* the wild yet. */ * the wild yet. */
if (!get_bits1(gb)) { if (!get_bits1(gb)) {
av_log_missing_feature(ctx, "WMAPro-in-WMAVoice", 1); avpriv_request_sample(ctx, "WMAPro-in-WMAVoice");
return AVERROR_PATCHWELCOME; return AVERROR_PATCHWELCOME;
} }