diff options
author | Peter Schlaile <peter@schlaile.de> | 2009-03-22 22:19:21 +0300 |
---|---|---|
committer | Peter Schlaile <peter@schlaile.de> | 2009-03-22 22:19:21 +0300 |
commit | 615c5232c7b2e51f9722fdff58e04ae53c043797 (patch) | |
tree | ee259a124d9c94e5363db7914cb1798931794875 /source | |
parent | d5d2d1feceb9f261ff04682ca4f6a2658c04ab5c (diff) |
== FFMPEG ==
Updated ffmpeg to release version 0.5
updated x264 to today's daily build
thanks to ben2610 for first patches (but you got hddaudio.c wrong :)
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/writeffmpeg.c | 28 | ||||
-rw-r--r-- | source/blender/imbuf/intern/IMB_anim.h | 6 | ||||
-rw-r--r-- | source/blender/imbuf/intern/anim.c | 8 | ||||
-rw-r--r-- | source/blender/imbuf/intern/util.c | 8 | ||||
-rw-r--r-- | source/blender/src/buttons_scene.c | 6 | ||||
-rw-r--r-- | source/blender/src/hddaudio.c | 12 | ||||
-rw-r--r-- | source/gameengine/VideoTexture/VideoFFmpeg.h | 8 |
7 files changed, 40 insertions, 36 deletions
diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c index cef6f802729..378e4319223 100644 --- a/source/blender/blenkernel/intern/writeffmpeg.c +++ b/source/blender/blenkernel/intern/writeffmpeg.c @@ -29,11 +29,11 @@ #include <stdlib.h> -#include <ffmpeg/avformat.h> -#include <ffmpeg/avcodec.h> -#include <ffmpeg/rational.h> -#include <ffmpeg/swscale.h> -#include <ffmpeg/opt.h> +#include <libavformat/avformat.h> +#include <libavcodec/avcodec.h> +#include <libavutil/rational.h> +#include <libswscale/swscale.h> +#include <libavcodec/opt.h> #if LIBAVFORMAT_VERSION_INT < (49 << 16) #define FFMPEG_OLD_FRAME_RATE 1 @@ -290,8 +290,8 @@ static AVFrame* generate_video_frame(uint8_t* pixels) int height = c->height; AVFrame* rgb_frame; - if (c->pix_fmt != PIX_FMT_RGBA32) { - rgb_frame = alloc_picture(PIX_FMT_RGBA32, width, height); + if (c->pix_fmt != PIX_FMT_BGR32) { + rgb_frame = alloc_picture(PIX_FMT_BGR32, width, height); if (!rgb_frame) { G.afbreek=1; error("Couldn't allocate temporary frame"); @@ -342,7 +342,7 @@ static AVFrame* generate_video_frame(uint8_t* pixels) } } - if (c->pix_fmt != PIX_FMT_RGBA32) { + if (c->pix_fmt != PIX_FMT_BGR32) { sws_scale(img_convert_ctx, rgb_frame->data, rgb_frame->linesize, 0, c->height, current_frame->data, current_frame->linesize); @@ -498,9 +498,11 @@ static AVStream* alloc_video_stream(int codec_id, AVFormatContext* of, c->pix_fmt = PIX_FMT_YUV420P; } - if (!strcmp(of->oformat->name, "mp4") || - !strcmp(of->oformat->name, "mov") || - !strcmp(of->oformat->name, "3gp")) { + if ((of->oformat->flags & AVFMT_GLOBALHEADER) +// || !strcmp(of->oformat->name, "mp4") +// || !strcmp(of->oformat->name, "mov") +// || !strcmp(of->oformat->name, "3gp") + ) { fprintf(stderr, "Using global header\n"); c->flags |= CODEC_FLAG_GLOBAL_HEADER; } @@ -514,7 +516,7 @@ static AVStream* alloc_video_stream(int codec_id, AVFormatContext* of, /* xasp & yasp got float lately... */ - c->sample_aspect_ratio = av_d2q( + st->sample_aspect_ratio = c->sample_aspect_ratio = av_d2q( ((double) G.scene->r.xasp / (double) G.scene->r.yasp), 255); set_ffmpeg_properties(c, "video"); @@ -531,7 +533,7 @@ static AVStream* alloc_video_stream(int codec_id, AVFormatContext* of, current_frame = alloc_picture(c->pix_fmt, c->width, c->height); img_convert_ctx = sws_getContext(c->width, c->height, - PIX_FMT_RGBA32, + PIX_FMT_BGR32, c->width, c->height, c->pix_fmt, SWS_BICUBIC, diff --git a/source/blender/imbuf/intern/IMB_anim.h b/source/blender/imbuf/intern/IMB_anim.h index 745248d3218..7e99df8237a 100644 --- a/source/blender/imbuf/intern/IMB_anim.h +++ b/source/blender/imbuf/intern/IMB_anim.h @@ -76,9 +76,9 @@ #endif /* WITH_QUICKTIME */ #ifdef WITH_FFMPEG -#include <ffmpeg/avformat.h> -#include <ffmpeg/avcodec.h> -#include <ffmpeg/swscale.h> +#include <libavformat/avformat.h> +#include <libavcodec/avcodec.h> +#include <libswscale/swscale.h> #endif #ifdef WITH_REDCODE diff --git a/source/blender/imbuf/intern/anim.c b/source/blender/imbuf/intern/anim.c index 80bf401bec0..42fe47cc5e9 100644 --- a/source/blender/imbuf/intern/anim.c +++ b/source/blender/imbuf/intern/anim.c @@ -83,10 +83,10 @@ #include "IMB_anim5.h" #ifdef WITH_FFMPEG -#include <ffmpeg/avformat.h> -#include <ffmpeg/avcodec.h> -#include <ffmpeg/rational.h> -#include <ffmpeg/swscale.h> +#include <libavformat/avformat.h> +#include <libavcodec/avcodec.h> +#include <libavutil/rational.h> +#include <libswscale/swscale.h> #if LIBAVFORMAT_VERSION_INT < (49 << 16) #define FFMPEG_OLD_FRAME_RATE 1 diff --git a/source/blender/imbuf/intern/util.c b/source/blender/imbuf/intern/util.c index 15d1d031dbd..ffd5d3431af 100644 --- a/source/blender/imbuf/intern/util.c +++ b/source/blender/imbuf/intern/util.c @@ -73,10 +73,10 @@ #endif #ifdef WITH_FFMPEG -#include <ffmpeg/avcodec.h> -#include <ffmpeg/avformat.h> -#include <ffmpeg/avdevice.h> -#include <ffmpeg/log.h> +#include <libavcodec/avcodec.h> +#include <libavformat/avformat.h> +#include <libavdevice/avdevice.h> +#include <libavutil/log.h> #if LIBAVFORMAT_VERSION_INT < (49 << 16) #define FFMPEG_OLD_FRAME_RATE 1 diff --git a/source/blender/src/buttons_scene.c b/source/blender/src/buttons_scene.c index 376a57b11e9..be988c5a68a 100644 --- a/source/blender/src/buttons_scene.c +++ b/source/blender/src/buttons_scene.c @@ -109,9 +109,9 @@ #ifdef WITH_FFMPEG -#include <ffmpeg/avcodec.h> /* for PIX_FMT_* and CODEC_ID_* */ -#include <ffmpeg/avformat.h> -#include <ffmpeg/opt.h> +#include <libavcodec/avcodec.h> /* for PIX_FMT_* and CODEC_ID_* */ +#include <libavformat/avformat.h> +#include <libavcodec/opt.h> static int ffmpeg_preset_sel = 0; diff --git a/source/blender/src/hddaudio.c b/source/blender/src/hddaudio.c index 7e6b314f296..7175f140b09 100644 --- a/source/blender/src/hddaudio.c +++ b/source/blender/src/hddaudio.c @@ -33,9 +33,9 @@ #endif #ifdef WITH_FFMPEG -#include <ffmpeg/avformat.h> -#include <ffmpeg/avcodec.h> -#include <ffmpeg/rational.h> +#include <libavformat/avformat.h> +#include <libavcodec/avcodec.h> +#include <libavutil/rational.h> #if LIBAVFORMAT_VERSION_INT < (49 << 16) #define FFMPEG_OLD_FRAME_RATE 1 #else @@ -311,7 +311,8 @@ static void sound_hdaudio_extract_small_block( audio_pkt_size = packet.size; while (audio_pkt_size > 0) { - len = avcodec_decode_audio( + data_size=AVCODEC_MAX_AUDIO_FRAME_SIZE; + len = avcodec_decode_audio2( hdaudio->pCodecCtx, hdaudio->decode_cache + decode_pos, @@ -478,7 +479,8 @@ static void sound_hdaudio_extract_small_block( } while (audio_pkt_size > 0) { - len = avcodec_decode_audio( + data_size=AVCODEC_MAX_AUDIO_FRAME_SIZE; + len = avcodec_decode_audio2( hdaudio->pCodecCtx, hdaudio->decode_cache + decode_pos, diff --git a/source/gameengine/VideoTexture/VideoFFmpeg.h b/source/gameengine/VideoTexture/VideoFFmpeg.h index 51ce2c4eebe..51f1067c466 100644 --- a/source/gameengine/VideoTexture/VideoFFmpeg.h +++ b/source/gameengine/VideoTexture/VideoFFmpeg.h @@ -25,10 +25,10 @@ http://www.gnu.org/copyleft/lesser.txt. #ifdef WITH_FFMPEG extern "C" { #include <pthread.h> -#include <ffmpeg/avformat.h> -#include <ffmpeg/avcodec.h> -#include <ffmpeg/rational.h> -#include <ffmpeg/swscale.h> +#include <libavformat/avformat.h> +#include <libavcodec/avcodec.h> +#include <libavutil/rational.h> +#include <libswscale/swscale.h> #include "DNA_listBase.h" #include "BLI_threads.h" #include "BLI_blenlib.h" |