OSDN Git Service

Merge commit '6d97484d72e33f7dde9493a9ead1a72e2f029605'
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 14 Mar 2013 11:52:12 +0000 (12:52 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 14 Mar 2013 11:52:12 +0000 (12:52 +0100)
* commit '6d97484d72e33f7dde9493a9ead1a72e2f029605':
  avcodec: av_log_ask_for_sample() ---> avpriv_request_sample()
  rsodec: Use avpriv_report_missing_feature() where appropriate

Conflicts:
libavcodec/anm.c
libavcodec/mlpdec.c
libavcodec/pictordec.c
libavcodec/sunrast.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
36 files changed:
1  2 
libavcodec/aacdec.c
libavcodec/adx.c
libavcodec/alac.c
libavcodec/anm.c
libavcodec/ansi.c
libavcodec/apedec.c
libavcodec/atrac3.c
libavcodec/cdxl.c
libavcodec/cinepak.c
libavcodec/cook.c
libavcodec/dcadec.c
libavcodec/h264.c
libavcodec/imc.c
libavcodec/indeo3.c
libavcodec/indeo4.c
libavcodec/loco.c
libavcodec/mlpdec.c
libavcodec/mpc7.c
libavcodec/mss2.c
libavcodec/pictordec.c
libavcodec/ptx.c
libavcodec/qcelpdec.c
libavcodec/ralf.c
libavcodec/sunrast.c
libavcodec/truemotion1.c
libavcodec/truespeech.c
libavcodec/utvideodec.c
libavcodec/v210x.c
libavcodec/vc1dec.c
libavcodec/vorbis_parser.c
libavcodec/wmalosslessdec.c
libavcodec/wmaprodec.c
libavcodec/wnv1.c
libavcodec/xwddec.c
libavcodec/zmbv.c
libavformat/rsodec.c

Simple merge
Simple merge
@@@ -579,15 -529,13 +579,14 @@@ static av_cold int alac_decode_init(AVC
          return -1;
      }
  
 +    req_packed = LIBAVCODEC_VERSION_MAJOR < 55 && !av_sample_fmt_is_planar(avctx->request_sample_fmt);
      switch (alac->sample_size) {
 -    case 16: avctx->sample_fmt = AV_SAMPLE_FMT_S16P;
 +    case 16: avctx->sample_fmt = req_packed ? AV_SAMPLE_FMT_S16 : AV_SAMPLE_FMT_S16P;
               break;
      case 24:
 -    case 32: avctx->sample_fmt = AV_SAMPLE_FMT_S32P;
 +    case 32: avctx->sample_fmt = req_packed ? AV_SAMPLE_FMT_S32 : AV_SAMPLE_FMT_S32P;
               break;
-     default: av_log_ask_for_sample(avctx, "Sample depth %d is not supported.\n",
-                                    alac->sample_size);
+     default: avpriv_request_sample(avctx, "Sample depth %d", alac->sample_size);
               return AVERROR_PATCHWELCOME;
      }
      avctx->bits_per_raw_sample = alac->sample_size;
@@@ -125,12 -127,12 +125,12 @@@ static int decode_frame(AVCodecContext 
      bytestream2_init(&s->gb, avpkt->data, buf_size);
  
      if (bytestream2_get_byte(&s->gb) != 0x42) {
-         av_log_ask_for_sample(avctx, "unknown record type\n");
+         avpriv_request_sample(avctx, "Unknown record type");
 -        return buf_size;
 +        return AVERROR_INVALIDDATA;
      }
      if (bytestream2_get_byte(&s->gb)) {
-         av_log_ask_for_sample(avctx, "padding bytes not supported\n");
+         avpriv_request_sample(avctx, "Padding bytes");
 -        return buf_size;
 +        return AVERROR_PATCHWELCOME;
      }
      bytestream2_skip(&s->gb, 2);
  
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -1197,13 -1183,9 +1198,13 @@@ static av_cold int cook_decode_init(AVC
          }
  
          if (q->subpacket[s].subbands > 50) {
-             av_log_ask_for_sample(avctx, "subbands > 50\n");
+             avpriv_request_sample(avctx, "subbands > 50");
              return AVERROR_PATCHWELCOME;
          }
 +        if (q->subpacket[s].subbands == 0) {
 +            av_log_ask_for_sample(avctx, "subbands is 0\n");
 +            return AVERROR_PATCHWELCOME;
 +        }
          q->subpacket[s].gains1.now      = q->subpacket[s].gain_1;
          q->subpacket[s].gains1.previous = q->subpacket[s].gain_2;
          q->subpacket[s].gains2.now      = q->subpacket[s].gain_3;
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -441,10 -429,11 +442,11 @@@ static int read_restart_header(MLPDecod
  
      /* This should happen for TrueHD streams with >6 channels and MLP's noise
       * type. It is not yet known if this is allowed. */
 -    if (s->max_channel > MAX_MATRIX_CHANNEL_MLP && !s->noise_type) {
 +    if (max_channel > MAX_MATRIX_CHANNEL_MLP && !s->noise_type) {
-         av_log_ask_for_sample(m->avctx,
-                "Number of channels %d is larger than the maximum supported "
-                "by the decoder.\n", max_channel + 2);
+         avpriv_request_sample(m->avctx,
+                               "%d channels (more than the "
+                               "maximum supported by the decoder)",
 -                              s->max_channel + 2);
++                              max_channel + 2);
          return AVERROR_PATCHWELCOME;
      }
  
              ch_assign = av_get_channel_layout_channel_index(s->ch_layout,
                                                              channel);
          }
 -        if (ch_assign > s->max_matrix_channel) {
 +        if ((unsigned)ch_assign > s->max_matrix_channel) {
-             av_log_ask_for_sample(m->avctx,
-                    "Assignment of matrix channel %d to invalid output channel %d.\n",
-                    ch, ch_assign);
+             avpriv_request_sample(m->avctx,
+                                   "Assignment of matrix channel %d to invalid output channel %d",
+                                   ch, ch_assign);
              return AVERROR_PATCHWELCOME;
          }
          s->ch_assign[ch_assign] = ch;
Simple merge
Simple merge
@@@ -123,7 -123,7 +123,7 @@@ static int decode_frame(AVCodecContext 
      s->nb_planes   = (tmp >> 4) + 1;
      bpp            = bits_per_plane * s->nb_planes;
      if (bits_per_plane > 8 || bpp < 1 || bpp > 32) {
-         av_log_ask_for_sample(avctx, "unsupported bit depth\n");
 -        avpriv_request_sample(s, "Unsupported bit depth");
++        avpriv_request_sample(avctx, "Unsupported bit depth");
          return AVERROR_PATCHWELCOME;
      }
  
Simple merge
Simple merge
Simple merge
@@@ -53,8 -53,8 +53,8 @@@ static int sunrast_decode_frame(AVCodec
      maplength = AV_RB32(buf + 28);
      buf      += 32;
  
 -    if (type == RT_FORMAT_TIFF || type == RT_FORMAT_IFF || type == RT_EXPERIMENTAL) {
 +    if (type == RT_EXPERIMENTAL) {
-         av_log_ask_for_sample(avctx, "unsupported (compression) type\n");
+         avpriv_request_sample(avctx, "TIFF/IFF/EXPERIMENTAL (compression) type");
          return AVERROR_PATCHWELCOME;
      }
      if (type > RT_FORMAT_IFF) {
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -1460,10 -1451,10 +1461,10 @@@ static void save_bits(WMAProDecodeCtx *
          init_put_bits(&s->pb, s->frame_data, MAX_FRAMESIZE);
      }
  
 -    buflen = (s->num_saved_bits + len + 8) >> 3;
 +    buflen = (put_bits_count(&s->pb) + len + 8) >> 3;
  
      if (len <= 0 || buflen > MAX_FRAMESIZE) {
-         av_log_ask_for_sample(s->avctx, "input buffer too small\n");
+         avpriv_request_sample(s->avctx, "Too small input buffer");
          s->packet_loss = 1;
          return;
      }
Simple merge
Simple merge
@@@ -474,15 -465,13 +471,14 @@@ static int decode_frame(AVCodecContext 
  #endif //ZMBV_ENABLE_24BPP
          case ZMBV_FMT_32BPP:
              c->bpp = 32;
 -            c->decode_intra = zmbv_decode_intra;
 +            decode_intra = zmbv_decode_intra;
              c->decode_xor = zmbv_decode_xor_32;
 +            avctx->pix_fmt = AV_PIX_FMT_BGR0;
 +            c->stride = c->width * 4;
              break;
          default:
 -            c->decode_intra = NULL;
              c->decode_xor = NULL;
-             av_log_ask_for_sample(avctx, "Unsupported (for now) format %i\n",
-                                   c->fmt);
+             avpriv_request_sample(avctx, "Format %i", c->fmt);
              return AVERROR_PATCHWELCOME;
          }
  
Simple merge