OSDN Git Service

Merge remote-tracking branch 'qatar/master'
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 14 Oct 2012 13:11:34 +0000 (15:11 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 14 Oct 2012 13:11:34 +0000 (15:11 +0200)
* qatar/master:
  avutil: Do not make ff_ symbols globally visible.
  avutil: Rename ff_set_systematic_pal2() ---> avpriv_set_systematic_pal2()
  build: tms470: work around glibc math.h problems
  configure: improve tms470 compiler usage with glibc

Conflicts:
libavcodec/bmpenc.c
libavcodec/rawdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
configure
libavcodec/bmpenc.c
libavcodec/pcxenc.c
libavcodec/rawdec.c
libavcodec/utils.c
libavfilter/vf_scale.c
libavutil/imgutils.c
libavutil/imgutils.h

diff --cc configure
Simple merge
@@@ -98,10 -93,7 +98,10 @@@ static int bmp_encode_frame(AVCodecCont
      case AV_PIX_FMT_RGB4_BYTE:
      case AV_PIX_FMT_BGR4_BYTE:
      case AV_PIX_FMT_GRAY8:
 -        avpriv_set_systematic_pal2((uint32_t*)p->data[1], avctx->pix_fmt);
 +        av_assert1(bit_count == 8);
-         ff_set_systematic_pal2(palette256, avctx->pix_fmt);
++        avpriv_set_systematic_pal2(palette256, avctx->pix_fmt);
 +        pal = palette256;
 +        break;
      case AV_PIX_FMT_PAL8:
          pal = (uint32_t *)p->data[1];
          break;
@@@ -129,11 -127,6 +129,11 @@@ static int pcx_encode_frame(AVCodecCont
      case AV_PIX_FMT_RGB4_BYTE:
      case AV_PIX_FMT_BGR4_BYTE:
      case AV_PIX_FMT_GRAY8:
-         ff_set_systematic_pal2(palette256, avctx->pix_fmt);
 +        bpp = 8;
 +        nplanes = 1;
++        avpriv_set_systematic_pal2(palette256, avctx->pix_fmt);
 +        pal = palette256;
 +        break;
      case AV_PIX_FMT_PAL8:
          bpp = 8;
          nplanes = 1;
@@@ -94,21 -77,17 +94,21 @@@ static av_cold int raw_init_decoder(AVC
  {
      RawVideoContext *context = avctx->priv_data;
  
 -    if (avctx->codec_tag == MKTAG('r','a','w',' '))
 -        avctx->pix_fmt = find_pix_fmt(pix_fmt_bps_mov, avctx->bits_per_coded_sample);
 +    if (avctx->codec_tag == MKTAG('r','a','w',' ') || avctx->codec_tag == MKTAG('N','O','1','6'))
 +        avctx->pix_fmt = ff_find_pix_fmt(pix_fmt_bps_mov, avctx->bits_per_coded_sample);
      else if (avctx->codec_tag == MKTAG('W','R','A','W'))
 -        avctx->pix_fmt = find_pix_fmt(pix_fmt_bps_avi, avctx->bits_per_coded_sample);
 +        avctx->pix_fmt = ff_find_pix_fmt(pix_fmt_bps_avi, avctx->bits_per_coded_sample);
      else if (avctx->codec_tag)
 -        avctx->pix_fmt = find_pix_fmt(ff_raw_pix_fmt_tags, avctx->codec_tag);
 +        avctx->pix_fmt = ff_find_pix_fmt(ff_raw_pix_fmt_tags, avctx->codec_tag);
      else if (avctx->pix_fmt == AV_PIX_FMT_NONE && avctx->bits_per_coded_sample)
 -        avctx->pix_fmt = find_pix_fmt(pix_fmt_bps_avi, avctx->bits_per_coded_sample);
 +        avctx->pix_fmt = ff_find_pix_fmt(pix_fmt_bps_avi, avctx->bits_per_coded_sample);
 +
 +    if (avctx->pix_fmt == AV_PIX_FMT_NONE) {
 +        av_log(avctx, AV_LOG_ERROR, "Pixel format was not specified and cannot be detected\n");
 +        return AVERROR(EINVAL);
 +    }
  
-     ff_set_systematic_pal2(context->palette, avctx->pix_fmt);
+     avpriv_set_systematic_pal2(context->palette, avctx->pix_fmt);
 -    context->length = avpicture_get_size(avctx->pix_fmt, avctx->width, avctx->height);
      if((avctx->bits_per_coded_sample == 4 || avctx->bits_per_coded_sample == 2) &&
         avctx->pix_fmt==AV_PIX_FMT_PAL8 &&
         (!avctx->codec_tag || avctx->codec_tag == MKTAG('r','a','w',' '))){
Simple merge
@@@ -319,12 -283,10 +319,12 @@@ static int start_frame(AVFilterLink *li
      outpicref->video->w = outlink->w;
      outpicref->video->h = outlink->h;
  
-         ff_set_systematic_pal2((uint32_t*)outpicref->data[1], outlink->format == AV_PIX_FMT_PAL8 ? AV_PIX_FMT_BGR8 : outlink->format);
 +    if(scale->output_is_pal)
++        avpriv_set_systematic_pal2((uint32_t*)outpicref->data[1], outlink->format == AV_PIX_FMT_PAL8 ? AV_PIX_FMT_BGR8 : outlink->format);
  
 -    av_reduce(&outpicref->video->pixel_aspect.num, &outpicref->video->pixel_aspect.den,
 -              (int64_t)picref->video->pixel_aspect.num * outlink->h * link->w,
 -              (int64_t)picref->video->pixel_aspect.den * outlink->w * link->h,
 +    av_reduce(&outpicref->video->sample_aspect_ratio.num, &outpicref->video->sample_aspect_ratio.den,
 +              (int64_t)picref->video->sample_aspect_ratio.num * outlink->h * link->w,
 +              (int64_t)picref->video->sample_aspect_ratio.den * outlink->w * link->h,
                INT_MAX);
  
      scale->slice_y = 0;
Simple merge
Simple merge