]> git.sesse.net Git - ffmpeg/commitdiff
Merge remote-tracking branch 'qatar/master'
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 15 Aug 2012 13:41:01 +0000 (15:41 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 15 Aug 2012 13:55:24 +0000 (15:55 +0200)
* qatar/master:
  rtmp: Add support for SWFVerification
  api-example: use new video encoding API.
  x86: avcodec: Appropriately name files containing only init functions
  mpegvideo_mmx_template: drop some commented-out cruft
  libavresample: add mix level normalization option
  w32pthreads: Add missing #includes to make header compile standalone
  rtmp: Gracefully ignore _checkbw errors by tracking them
  rtmp: Do not send _checkbw calls as notifications
  prores: interlaced ProRes encoding

Conflicts:
doc/examples/decoding_encoding.c
libavcodec/proresenc_kostya.c
libavcodec/w32pthreads.h
libavcodec/x86/Makefile
libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
13 files changed:
1  2 
doc/examples/decoding_encoding.c
doc/protocols.texi
libavcodec/proresenc_kostya.c
libavcodec/w32pthreads.h
libavcodec/x86/Makefile
libavcodec/x86/ac3dsp_init.c
libavcodec/x86/fft_init.c
libavcodec/x86/fmtconvert_init.c
libavcodec/x86/h264dsp_init.c
libavcodec/x86/mpegvideo_mmx_template.c
libavformat/rtmp.h
libavformat/rtmpproto.c
libavformat/version.h

index 6295001f076835bf4ce72aabc133bad5ba751b21,4db92d3702153f2136b6f1b793259198d9191dce..919ee489b633d6910fd46dbddfc9ebe98065daed
   * format handling
   */
  
 -#include <stdlib.h>
 -#include <stdio.h>
 -#include <string.h>
 -
 -#ifdef HAVE_AV_CONFIG_H
 -#undef HAVE_AV_CONFIG_H
 -#endif
 +#include <math.h>
  
- #include <libavutil/imgutils.h>
 -#include "libavcodec/avcodec.h"
 -#include "libavutil/audioconvert.h"
 -#include "libavutil/imgutils.h"
 -#include "libavutil/mathematics.h"
 -#include "libavutil/samplefmt.h"
 +#include <libavutil/opt.h>
 +#include <libavcodec/avcodec.h>
 +#include <libavutil/audioconvert.h>
++#include <libavutil/imgutils.h>
 +#include <libavutil/mathematics.h>
 +#include <libavutil/samplefmt.h>
  
  #define INBUF_SIZE 4096
  #define AUDIO_INBUF_SIZE 20480
@@@ -315,16 -317,16 +315,16 @@@ static void video_encode_example(const 
  {
      AVCodec *codec;
      AVCodecContext *c= NULL;
-     int i, out_size, x, y, outbuf_size;
+     int i, ret, x, y, got_output;
      FILE *f;
      AVFrame *picture;
-     uint8_t *outbuf;
-     int had_output=0;
+     AVPacket pkt;
+     uint8_t endcode[] = { 0, 0, 1, 0xb7 };
  
 -    printf("Video encoding\n");
 +    printf("Encode video file %s\n", filename);
  
      /* find the mpeg1 video encoder */
 -    codec = avcodec_find_encoder(AV_CODEC_ID_MPEG1VIDEO);
 +    codec = avcodec_find_encoder(codec_id);
      if (!codec) {
          fprintf(stderr, "codec not found\n");
          exit(1);
          exit(1);
      }
  
-     /* alloc image and output buffer */
-     outbuf_size = 100000 + 12*c->width*c->height;
-     outbuf = malloc(outbuf_size);
 +    /* the image can be allocated by any means and av_image_alloc() is
 +     * just the most convenient way if av_malloc() is to be used */
-     av_image_alloc(picture->data, picture->linesize,
-                    c->width, c->height, c->pix_fmt, 1);
+     ret = av_image_alloc(picture->data, picture->linesize, c->width, c->height,
+                          c->pix_fmt, 32);
+     if (ret < 0) {
+         fprintf(stderr, "could not alloc raw picture buffer\n");
+         exit(1);
+     }
++
+     picture->format = c->pix_fmt;
+     picture->width  = c->width;
+     picture->height = c->height;
  
      /* encode 1 second of video */
      for(i=0;i<25;i++) {
      }
  
      /* get the delayed frames */
-     for(; out_size || !had_output; i++) {
+     for (got_output = 1; got_output; i++) {
          fflush(stdout);
  
-         out_size = avcodec_encode_video(c, outbuf, outbuf_size, NULL);
-         had_output |= out_size;
-         printf("write frame %3d (size=%5d)\n", i, out_size);
-         fwrite(outbuf, 1, out_size, f);
+         ret = avcodec_encode_video2(c, &pkt, NULL, &got_output);
+         if (ret < 0) {
+             fprintf(stderr, "error encoding frame\n");
+             exit(1);
+         }
+         if (got_output) {
 -            printf("encoding frame %3d (size=%5d)\n", i, pkt.size);
++            printf("write frame %3d (size=%5d)\n", i, pkt.size);
+             fwrite(pkt.data, 1, pkt.size, f);
+             av_free_packet(&pkt);
+         }
      }
  
      /* add sequence end code to have a real mpeg file */
Simple merge
Simple merge
index fbc183a645778eee8ac1b2c9a82560750e40cc6c,8489f715db9503da4c58538374358224206ff5fc..c4bbb9a51bf34f982bf802188e70435b502f34ae
@@@ -39,7 -39,8 +39,9 @@@
  #include <windows.h>
  #include <process.h>
  
 +#include "libavutil/common.h"
+ #include "libavutil/internal.h"
+ #include "libavutil/mem.h"
  
  typedef struct {
      void *handle;
index e01454a1b73d8a13d7720221163131ca9f8ece1b,4d0668597525d707a52f4af8281689bc3083f9b0..0ad3457738c60c0beb8fbb970ba0cdbc5878afb9
@@@ -13,15 -13,13 +13,15 @@@ MMX-OBJS                               
                                            x86/simple_idct_mmx.o         \
  
  MMX-OBJS-$(CONFIG_AAC_DECODER)         += x86/sbrdsp_init.o
- MMX-OBJS-$(CONFIG_AC3DSP)              += x86/ac3dsp_mmx.o
+ MMX-OBJS-$(CONFIG_AC3DSP)              += x86/ac3dsp_init.o
  MMX-OBJS-$(CONFIG_CAVS_DECODER)        += x86/cavsdsp_mmx.o
  MMX-OBJS-$(CONFIG_DNXHD_ENCODER)       += x86/dnxhd_mmx.o
 -MMX-OBJS-$(CONFIG_DWT)                 += x86/snowdsp_mmx.o
 +MMX-OBJS-$(CONFIG_DWT)                 += x86/snowdsp_mmx.o \
 +                                          x86/dwt.o
  MMX-OBJS-$(CONFIG_ENCODERS)            += x86/dsputilenc_mmx.o
- MMX-OBJS-$(CONFIG_FFT)                 += x86/fft.o
+ MMX-OBJS-$(CONFIG_FFT)                 += x86/fft_init.o
 +MMX-OBJS-$(CONFIG_GPL)                 += x86/idct_mmx.o
- MMX-OBJS-$(CONFIG_H264DSP)             += x86/h264dsp_mmx.o
+ MMX-OBJS-$(CONFIG_H264DSP)             += x86/h264dsp_init.o
  MMX-OBJS-$(CONFIG_H264PRED)            += x86/h264_intrapred_init.o
  MMX-OBJS-$(CONFIG_LPC)                 += x86/lpc_mmx.o
  MMX-OBJS-$(CONFIG_MPEGAUDIODSP)        += x86/mpegaudiodec_mmx.o
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 99a8ddfdb8b5380327934e6e5eaf2410aa578310,54185fa5b727f664df4bdfb7383d4b579a41bfa7..f68805cef7802d3b3aee54e256b2df05121daedc
@@@ -30,8 -30,8 +30,8 @@@
  #include "libavutil/avutil.h"
  
  #define LIBAVFORMAT_VERSION_MAJOR 54
 -#define LIBAVFORMAT_VERSION_MINOR 13
 -#define LIBAVFORMAT_VERSION_MICRO  3
 +#define LIBAVFORMAT_VERSION_MINOR 23
- #define LIBAVFORMAT_VERSION_MICRO 100
++#define LIBAVFORMAT_VERSION_MICRO 101
  
  #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
                                                 LIBAVFORMAT_VERSION_MINOR, \