ffmpeg-mt:

- merge with ffmpeg
- remove ffmpeg-mt
This commit is contained in:
Stephan Raue 2009-10-05 20:54:24 +02:00
parent 7e46b41eea
commit 9c8f195388
13 changed files with 210 additions and 325 deletions

View File

@ -1,6 +0,0 @@
# to get it from git:
git clone git://gitorious.org/~astrange/ffmpeg/ffmpeg-mt.git
cd ffmpeg-mt
git clone git://git.ffmpeg.org/libswscale/
cd ..

View File

@ -1,79 +0,0 @@
#!/bin/sh
. config/options
$SCRIPTS/build toolchain
$SCRIPTS/build faad2
$SCRIPTS/build zlib
cd $PKG_BUILD/
./configure --prefix=/usr \
--cpu=$TARGET_CPU \
--arch=$TARGET_ARCH \
--enable-cross-compile \
--cross-prefix=$TARGET_PREFIX \
--sysroot=$SYSROOT_PREFIX \
--extra-cflags="$CFLAGS" \
--disable-debug \
--enable-stripping \
--disable-static \
--enable-shared \
--enable-gpl \
--enable-yasm \
--disable-ffplay \
--disable-ffserver \
--disable-ffmpeg \
--enable-postproc \
--disable-avfilter \
--disable-avfilter-lavf \
--enable-pthreads \
--disable-x11grab \
--enable-ipv6 \
--disable-mpegaudio-hp \
--disable-gray \
--enable-swscale-alpha \
--enable-fastdiv \
--enable-small \
--enable-aandct \
--enable-fft \
--enable-golomb \
--enable-mdct \
--enable-rdft \
--disable-vaapi \
--disable-vdpau \
--enable-encoders \
--enable-decoders \
--enable-muxers \
--enable-demuxers \
--enable-parsers \
--enable-bsfs \
--enable-protocols \
--disable-indevs \
--disable-outdevs \
--disable-devices \
--enable-filters \
--disable-avisynth \
--disable-bzlib \
--disable-libopencore-amrnb \
--disable-libopencore-amrwb \
--disable-libdc1394 \
--disable-libdirac \
--disable-libfaac \
--enable-libfaad \
--disable-libfaadbin \
--disable-libgsm \
--disable-libmp3lame \
--disable-libnut \
--disable-libopenjpeg \
--disable-libschroedinger \
--disable-libspeex \
--disable-libtheora \
--disable-libvorbis \
--disable-libx264 \
--disable-libxvid \
--disable-mlib \
--enable-zlib \
make
$MAKEINSTALL

View File

@ -1,12 +0,0 @@
#!/bin/sh
. config/options
$SCRIPTS/install zlib
mkdir -p $INSTALL/usr/lib
cp -P $PKG_BUILD/libavcodec/libavcodec.so* $INSTALL/usr/lib
cp -P $PKG_BUILD/libavformat/libavformat.so* $INSTALL/usr/lib
cp -P $PKG_BUILD/libavutil/libavutil.so* $INSTALL/usr/lib
cp -P $PKG_BUILD/libswscale/libswscale.so.* $INSTALL/usr/lib
cp -P $PKG_BUILD/libpostproc/libpostproc.so.* $INSTALL/usr/lib

View File

@ -1,12 +0,0 @@
diff -Naur ffmpeg-export-2009-06-13.orig/configure ffmpeg-export-2009-06-13/configure
--- ffmpeg-export-2009-06-13.orig/configure 2009-06-10 22:50:53.000000000 +0200
+++ ffmpeg-export-2009-06-13/configure 2009-06-21 14:51:52.000000000 +0200
@@ -2129,7 +2129,7 @@
disable sdl_too_old
disable sdl
-SDL_CONFIG="${cross_prefix}sdl-config"
+SDL_CONFIG="sdl-config"
if "${SDL_CONFIG}" --version > /dev/null 2>&1; then
sdl_cflags=$("${SDL_CONFIG}" --cflags)
temp_cflags $sdl_cflags

View File

@ -1 +0,0 @@
http://sources.openelec.tv/svn/ffmpeg-mt-20091002.tar.bz2

View File

@ -1,6 +0,0 @@
# to get it from git:
git clone git://git.ffmpeg.org/ffmpeg/
cd ffmpeg
git clone git://git.ffmpeg.org/libswscale/
cd ..

View File

@ -3,30 +3,24 @@
. config/options
$SCRIPTS/build toolchain
$SCRIPTS/build zlib
$SCRIPTS/build faad2
if [ "$DEVTOOLS" = "yes" ]; then
$SCRIPTS/build SDL
$SCRIPTS/build SDL_image
$SCRIPTS/build SDL_mixer
DEVTOOLS_CONFIG="--enable-ffplay"
else
DEVTOOLS_CONFIG="--disable-ffplay"
fi
$SCRIPTS/build zlib
cd $PKG_BUILD/
./configure --enable-cross-compile \
--cross-prefix=$TARGET_PREFIX \
--arch=$TARGET_ARCH \
--prefix=/usr \
--extra-cflags="$CFLAGS" \
./configure --prefix=/usr \
--cpu=$TARGET_CPU \
--arch=$TARGET_ARCH \
--enable-cross-compile \
--cross-prefix=$TARGET_PREFIX \
--sysroot=$SYSROOT_PREFIX \
--extra-cflags="$CFLAGS" \
--disable-debug \
--enable-stripping \
--disable-static \
--enable-shared \
--enable-gpl \
--enable-yasm \
--disable-ffplay \
--disable-ffserver \
--disable-ffmpeg \
--enable-postproc \
@ -34,8 +28,19 @@ cd $PKG_BUILD/
--disable-avfilter-lavf \
--enable-pthreads \
--disable-x11grab \
--enable-ipv6 \
--disable-ipv6 \
--disable-mpegaudio-hp \
--disable-gray \
--enable-swscale-alpha \
--enable-fastdiv \
--enable-small \
--enable-aandct \
--enable-fft \
--enable-golomb \
--enable-mdct \
--enable-rdft \
--disable-vaapi \
--disable-vdpau \
--enable-encoders \
--enable-decoders \
--enable-muxers \
@ -47,9 +52,27 @@ cd $PKG_BUILD/
--disable-outdevs \
--disable-devices \
--enable-filters \
--enable-zlib \
--disable-avisynth \
--disable-bzlib \
--disable-libopencore-amrnb \
--disable-libopencore-amrwb \
--disable-libdc1394 \
--disable-libdirac \
--disable-libfaac \
--enable-libfaad \
$DEVTOOLS_CONFIG \
--disable-libfaadbin \
--disable-libgsm \
--disable-libmp3lame \
--disable-libnut \
--disable-libopenjpeg \
--disable-libschroedinger \
--disable-libspeex \
--disable-libtheora \
--disable-libvorbis \
--disable-libx264 \
--disable-libxvid \
--disable-mlib \
--enable-zlib \
make

View File

@ -10,11 +10,3 @@ cp -P $PKG_BUILD/libavformat/libavformat.so* $INSTALL/usr/lib
cp -P $PKG_BUILD/libavutil/libavutil.so* $INSTALL/usr/lib
cp -P $PKG_BUILD/libswscale/libswscale.so.* $INSTALL/usr/lib
cp -P $PKG_BUILD/libpostproc/libpostproc.so.* $INSTALL/usr/lib
if [ "$DEVTOOLS" = "yes" ]; then
$SCRIPTS/install SDL
$SCRIPTS/install SDL_image
$SCRIPTS/install SDL_mixer
mkdir -p $INSTALL/usr/bin && cp -P $PKG_BUILD/ffplay $INSTALL/usr/bin
cp -P $PKG_BUILD/libavdevice/libavdevice.so* $INSTALL/usr/lib
fi

View File

@ -1,12 +0,0 @@
diff -Naur ffmpeg-export-2009-06-13.orig/configure ffmpeg-export-2009-06-13/configure
--- ffmpeg-export-2009-06-13.orig/configure 2009-06-10 22:50:53.000000000 +0200
+++ ffmpeg-export-2009-06-13/configure 2009-06-21 14:51:52.000000000 +0200
@@ -2129,7 +2129,7 @@
disable sdl_too_old
disable sdl
-SDL_CONFIG="${cross_prefix}sdl-config"
+SDL_CONFIG="sdl-config"
if "${SDL_CONFIG}" --version > /dev/null 2>&1; then
sdl_cflags=$("${SDL_CONFIG}" --cflags)
temp_cflags $sdl_cflags

View File

@ -1,6 +1,6 @@
diff -Naur ffmpeg-export-2009-06-13.orig/doc/multithreading.txt ffmpeg-export-2009-06-13/doc/multithreading.txt
--- ffmpeg-export-2009-06-13.orig/doc/multithreading.txt 1970-01-01 01:00:00.000000000 +0100
+++ ffmpeg-export-2009-06-13/doc/multithreading.txt 2009-06-13 22:24:17.000000000 +0200
diff -Naur ffmpeg-export-2009-10-03.orig/doc/multithreading.txt ffmpeg-export-2009-10-03/doc/multithreading.txt
--- ffmpeg-export-2009-10-03.orig/doc/multithreading.txt 1970-01-01 01:00:00.000000000 +0100
+++ ffmpeg-export-2009-10-03/doc/multithreading.txt 2009-10-03 20:07:32.000000000 +0200
@@ -0,0 +1,73 @@
+FFmpeg multithreading methods
+==============================================
@ -75,9 +75,9 @@ diff -Naur ffmpeg-export-2009-06-13.orig/doc/multithreading.txt ffmpeg-export-20
+
+5. Call ff_report_frame_setup_done() as soon as possible. This will start the
+next thread.
diff -Naur ffmpeg-export-2009-06-13.orig/ffmpeg/doc/multithreading.txt ffmpeg-export-2009-06-13/ffmpeg/doc/multithreading.txt
--- ffmpeg-export-2009-06-13.orig/ffmpeg/doc/multithreading.txt 1970-01-01 01:00:00.000000000 +0100
+++ ffmpeg-export-2009-06-13/ffmpeg/doc/multithreading.txt 2009-06-13 22:24:08.000000000 +0200
diff -Naur ffmpeg-export-2009-10-03.orig/ffmpeg/doc/multithreading.txt ffmpeg-export-2009-10-03/ffmpeg/doc/multithreading.txt
--- ffmpeg-export-2009-10-03.orig/ffmpeg/doc/multithreading.txt 1970-01-01 01:00:00.000000000 +0100
+++ ffmpeg-export-2009-10-03/ffmpeg/doc/multithreading.txt 2009-10-03 20:07:32.000000000 +0200
@@ -0,0 +1,73 @@
+FFmpeg multithreading methods
+==============================================
@ -152,10 +152,10 @@ diff -Naur ffmpeg-export-2009-06-13.orig/ffmpeg/doc/multithreading.txt ffmpeg-ex
+
+5. Call ff_report_frame_setup_done() as soon as possible. This will start the
+next thread.
diff -Naur ffmpeg-export-2009-06-13.orig/ffmpeg.c ffmpeg-export-2009-06-13/ffmpeg.c
--- ffmpeg-export-2009-06-13.orig/ffmpeg.c 2009-06-13 21:35:05.000000000 +0200
+++ ffmpeg-export-2009-06-13/ffmpeg.c 2009-06-13 22:24:17.000000000 +0200
@@ -480,11 +480,6 @@
diff -Naur ffmpeg-export-2009-10-03.orig/ffmpeg.c ffmpeg-export-2009-10-03/ffmpeg.c
--- ffmpeg-export-2009-10-03.orig/ffmpeg.c 2009-10-03 20:07:16.000000000 +0200
+++ ffmpeg-export-2009-10-03/ffmpeg.c 2009-10-03 20:07:32.000000000 +0200
@@ -495,11 +495,6 @@
else if (st->codec->codec_type == CODEC_TYPE_VIDEO && video_stream_copy)
st->stream_copy = 1;
@ -167,7 +167,7 @@ diff -Naur ffmpeg-export-2009-06-13.orig/ffmpeg.c ffmpeg-export-2009-06-13/ffmpe
if(st->codec->flags & CODEC_FLAG_BITEXACT)
nopts = 1;
}
@@ -2860,8 +2855,6 @@
@@ -2913,8 +2908,6 @@
/* update the current parameters so that they match the one of the input stream */
for(i=0;i<ic->nb_streams;i++) {
AVCodecContext *enc = ic->streams[i]->codec;
@ -176,7 +176,7 @@ diff -Naur ffmpeg-export-2009-06-13.orig/ffmpeg.c ffmpeg-export-2009-06-13/ffmpe
enc->thread_count= thread_count;
switch(enc->codec_type) {
case CODEC_TYPE_AUDIO:
@@ -2994,8 +2987,7 @@
@@ -3047,8 +3040,7 @@
bitstream_filters[nb_output_files][oc->nb_streams - 1]= video_bitstream_filters;
video_bitstream_filters= NULL;
@ -186,7 +186,7 @@ diff -Naur ffmpeg-export-2009-06-13.orig/ffmpeg.c ffmpeg-export-2009-06-13/ffmpe
video_enc = st->codec;
@@ -3137,8 +3129,7 @@
@@ -3190,8 +3182,7 @@
bitstream_filters[nb_output_files][oc->nb_streams - 1]= audio_bitstream_filters;
audio_bitstream_filters= NULL;
@ -196,10 +196,10 @@ diff -Naur ffmpeg-export-2009-06-13.orig/ffmpeg.c ffmpeg-export-2009-06-13/ffmpe
audio_enc = st->codec;
audio_enc->codec_type = CODEC_TYPE_AUDIO;
diff -Naur ffmpeg-export-2009-06-13.orig/ffplay.c ffmpeg-export-2009-06-13/ffplay.c
--- ffmpeg-export-2009-06-13.orig/ffplay.c 2009-06-13 21:35:05.000000000 +0200
+++ ffmpeg-export-2009-06-13/ffplay.c 2009-06-13 22:24:17.000000000 +0200
@@ -1737,6 +1737,7 @@
diff -Naur ffmpeg-export-2009-10-03.orig/ffplay.c ffmpeg-export-2009-10-03/ffplay.c
--- ffmpeg-export-2009-10-03.orig/ffplay.c 2009-10-03 20:07:16.000000000 +0200
+++ ffmpeg-export-2009-10-03/ffplay.c 2009-10-03 20:07:32.000000000 +0200
@@ -1719,6 +1719,7 @@
enc->skip_loop_filter= skip_loop_filter;
enc->error_recognition= error_recognition;
enc->error_concealment= error_concealment;
@ -207,7 +207,7 @@ diff -Naur ffmpeg-export-2009-06-13.orig/ffplay.c ffmpeg-export-2009-06-13/ffpla
set_context_opts(enc, avcodec_opts[enc->codec_type], 0);
@@ -1761,9 +1762,6 @@
@@ -1743,9 +1744,6 @@
is->audio_src_fmt= SAMPLE_FMT_S16;
}
@ -217,21 +217,21 @@ diff -Naur ffmpeg-export-2009-06-13.orig/ffplay.c ffmpeg-export-2009-06-13/ffpla
ic->streams[stream_index]->discard = AVDISCARD_DEFAULT;
switch(enc->codec_type) {
case CODEC_TYPE_AUDIO:
diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/avcodec.h ffmpeg-export-2009-06-13/libavcodec/avcodec.h
--- ffmpeg-export-2009-06-13.orig/libavcodec/avcodec.h 2009-06-13 21:35:05.000000000 +0200
+++ ffmpeg-export-2009-06-13/libavcodec/avcodec.h 2009-06-13 22:24:17.000000000 +0200
@@ -601,6 +601,10 @@
* Codec can export data for HW decoding (VDPAU).
diff -Naur ffmpeg-export-2009-10-03.orig/libavcodec/avcodec.h ffmpeg-export-2009-10-03/libavcodec/avcodec.h
--- ffmpeg-export-2009-10-03.orig/libavcodec/avcodec.h 2009-10-03 20:07:16.000000000 +0200
+++ ffmpeg-export-2009-10-03/libavcodec/avcodec.h 2009-10-03 20:11:34.000000000 +0200
@@ -609,6 +609,10 @@
* Codec can output multiple frames per AVPacket
*/
#define CODEC_CAP_HWACCEL_VDPAU 0x0080
#define CODEC_CAP_SUBFRAMES 0x0100
+/**
+ * Codec supports frame-based multithreading.
+ */
+#define CODEC_CAP_FRAME_THREADS 0x0100
+#define CODEC_CAP_FRAME_THREADS 0x0200
//The following defines may change, don't expect compatibility if you use them.
#define MB_TYPE_INTRA4x4 0x0001
@@ -880,7 +884,20 @@
@@ -888,7 +892,20 @@
* - decoding: Set by libavcodec\
*/\
void *hwaccel_picture_private;\
@ -253,7 +253,7 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/avcodec.h ffmpeg-export-2009
#define FF_QSCALE_TYPE_MPEG1 0
#define FF_QSCALE_TYPE_MPEG2 1
@@ -1086,7 +1103,7 @@
@@ -1094,7 +1111,7 @@
* If non NULL, 'draw_horiz_band' is called by the libavcodec
* decoder to draw a horizontal band. It improves cache usage. Not
* all codecs can do that. You must check the codec capabilities
@ -262,7 +262,7 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/avcodec.h ffmpeg-export-2009
* The function is also used by hardware acceleration APIs.
* It is called at least once during frame decoding to pass
* the data needed for hardware render.
@@ -1344,7 +1361,9 @@
@@ -1352,7 +1369,9 @@
/**
* Called to release buffers which were allocated with get_buffer.
* A released buffer can be reused in get_buffer().
@ -273,7 +273,7 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/avcodec.h ffmpeg-export-2009
* - encoding: unused
* - decoding: Set by libavcodec., user can override.
*/
@@ -2456,7 +2475,7 @@
@@ -2464,7 +2483,7 @@
*/
float rc_min_vbv_overflow_use;
@ -282,12 +282,10 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/avcodec.h ffmpeg-export-2009
* Hardware accelerator in use
* - encoding: unused.
* - decoding: Set by libavcodec
@@ -2517,7 +2536,33 @@
* - encoding: Set by user
@@ -2526,6 +2545,32 @@
* - decoding: Set by libavcodec
*/
- enum AVChromaLocation chroma_sample_location;
+ enum AVChromaLocation chroma_sample_location;
enum AVChromaLocation chroma_sample_location;
+
+ /**
+ * Whether this is a copy of the context which had init() called on it.
@ -317,7 +315,7 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/avcodec.h ffmpeg-export-2009
} AVCodecContext;
/**
@@ -2559,6 +2604,26 @@
@@ -2567,6 +2612,26 @@
const int *supported_samplerates; ///< array of supported audio samplerates, or NULL if unknown, array is terminated by 0
const enum SampleFormat *sample_fmts; ///< array of supported sample formats, or NULL if unknown, array is terminated by -1
const int64_t *channel_layouts; ///< array of support channel layouts, or NULL if unknown. array is terminated by 0
@ -344,9 +342,9 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/avcodec.h ffmpeg-export-2009
} AVCodec;
/**
diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/beosthread.c ffmpeg-export-2009-06-13/libavcodec/beosthread.c
--- ffmpeg-export-2009-06-13.orig/libavcodec/beosthread.c 2009-06-13 21:35:05.000000000 +0200
+++ ffmpeg-export-2009-06-13/libavcodec/beosthread.c 2009-06-13 22:24:17.000000000 +0200
diff -Naur ffmpeg-export-2009-10-03.orig/libavcodec/beosthread.c ffmpeg-export-2009-10-03/libavcodec/beosthread.c
--- ffmpeg-export-2009-10-03.orig/libavcodec/beosthread.c 2009-10-03 20:07:16.000000000 +0200
+++ ffmpeg-export-2009-10-03/libavcodec/beosthread.c 2009-10-03 20:07:32.000000000 +0200
@@ -121,7 +121,13 @@
int i;
ThreadContext *c;
@ -361,10 +359,10 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/beosthread.c ffmpeg-export-2
assert(!s->thread_opaque);
c= av_mallocz(sizeof(ThreadContext)*thread_count);
diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/dsputil.c ffmpeg-export-2009-06-13/libavcodec/dsputil.c
--- ffmpeg-export-2009-06-13.orig/libavcodec/dsputil.c 2009-06-13 21:35:05.000000000 +0200
+++ ffmpeg-export-2009-06-13/libavcodec/dsputil.c 2009-06-13 22:24:17.000000000 +0200
@@ -438,7 +438,7 @@
diff -Naur ffmpeg-export-2009-10-03.orig/libavcodec/dsputil.c ffmpeg-export-2009-10-03/libavcodec/dsputil.c
--- ffmpeg-export-2009-10-03.orig/libavcodec/dsputil.c 2009-10-03 20:07:16.000000000 +0200
+++ ffmpeg-export-2009-10-03/libavcodec/dsputil.c 2009-10-03 20:07:32.000000000 +0200
@@ -440,7 +440,7 @@
/* draw the edges of width 'w' of an image of size width, height */
//FIXME check that this is ok for mpeg4 interlaced
@ -373,7 +371,7 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/dsputil.c ffmpeg-export-2009
{
uint8_t *ptr, *last_line;
int i;
@@ -446,8 +446,8 @@
@@ -448,8 +448,8 @@
last_line = buf + (height - 1) * wrap;
for(i=0;i<w;i++) {
/* top and bottom */
@ -384,7 +382,7 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/dsputil.c ffmpeg-export-2009
}
/* left and right */
ptr = buf;
@@ -458,10 +458,15 @@
@@ -460,10 +460,15 @@
}
/* corners */
for(i=0;i<w;i++) {
@ -404,10 +402,10 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/dsputil.c ffmpeg-export-2009
}
}
diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/dsputil.h ffmpeg-export-2009-06-13/libavcodec/dsputil.h
--- ffmpeg-export-2009-06-13.orig/libavcodec/dsputil.h 2009-06-13 21:35:05.000000000 +0200
+++ ffmpeg-export-2009-06-13/libavcodec/dsputil.h 2009-06-13 22:24:17.000000000 +0200
@@ -448,8 +448,10 @@
diff -Naur ffmpeg-export-2009-10-03.orig/libavcodec/dsputil.h ffmpeg-export-2009-10-03/libavcodec/dsputil.h
--- ffmpeg-export-2009-10-03.orig/libavcodec/dsputil.h 2009-10-03 20:07:16.000000000 +0200
+++ ffmpeg-export-2009-10-03/libavcodec/dsputil.h 2009-10-03 20:07:32.000000000 +0200
@@ -497,8 +497,10 @@
#define BASIS_SHIFT 16
#define RECON_SHIFT 6
@ -419,9 +417,9 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/dsputil.h ffmpeg-export-2009
/* h264 functions */
/* NOTE!!! if you implement any of h264_idct8_add, h264_idct8_add4 then you must implement all of them
diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/h263.c ffmpeg-export-2009-06-13/libavcodec/h263.c
--- ffmpeg-export-2009-06-13.orig/libavcodec/h263.c 2009-06-13 21:35:05.000000000 +0200
+++ ffmpeg-export-2009-06-13/libavcodec/h263.c 2009-06-13 22:24:17.000000000 +0200
diff -Naur ffmpeg-export-2009-10-03.orig/libavcodec/h263.c ffmpeg-export-2009-10-03/libavcodec/h263.c
--- ffmpeg-export-2009-10-03.orig/libavcodec/h263.c 2009-10-03 20:07:16.000000000 +0200
+++ ffmpeg-export-2009-10-03/libavcodec/h263.c 2009-10-03 20:07:32.000000000 +0200
@@ -41,6 +41,7 @@
#include "mpeg4data.h"
#include "mathops.h"
@ -468,9 +466,9 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/h263.c ffmpeg-export-2009-06
if(s->pict_type==FF_B_TYPE && s->next_picture.mbskip_table[xy + delta])
return SLICE_OK;
return SLICE_END;
diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/h263dec.c ffmpeg-export-2009-06-13/libavcodec/h263dec.c
--- ffmpeg-export-2009-06-13.orig/libavcodec/h263dec.c 2009-06-13 21:35:05.000000000 +0200
+++ ffmpeg-export-2009-06-13/libavcodec/h263dec.c 2009-06-13 22:24:17.000000000 +0200
diff -Naur ffmpeg-export-2009-10-03.orig/libavcodec/h263dec.c ffmpeg-export-2009-10-03/libavcodec/h263dec.c
--- ffmpeg-export-2009-10-03.orig/libavcodec/h263dec.c 2009-10-03 20:07:16.000000000 +0200
+++ ffmpeg-export-2009-10-03/libavcodec/h263dec.c 2009-10-03 20:07:32.000000000 +0200
@@ -32,6 +32,7 @@
#include "h263_parser.h"
#include "mpeg4video_parser.h"
@ -495,7 +493,7 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/h263dec.c ffmpeg-export-2009
s->mb_x= 0;
}
@@ -626,6 +629,7 @@
@@ -621,6 +624,7 @@
if(MPV_frame_start(s, avctx) < 0)
return -1;
@ -503,7 +501,7 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/h263dec.c ffmpeg-export-2009
if (avctx->hwaccel) {
if (avctx->hwaccel->start_frame(avctx, buf, buf_size) < 0)
return -1;
@@ -744,6 +748,7 @@
@@ -735,6 +739,7 @@
.flush= ff_mpeg_flush,
.long_name= NULL_IF_CONFIG_SMALL("MPEG-4 part 2"),
.pix_fmts= ff_hwaccel_pixfmt_list_420,
@ -511,9 +509,9 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/h263dec.c ffmpeg-export-2009
};
AVCodec h263_decoder = {
diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/h264.c ffmpeg-export-2009-06-13/libavcodec/h264.c
--- ffmpeg-export-2009-06-13.orig/libavcodec/h264.c 2009-06-13 21:35:05.000000000 +0200
+++ ffmpeg-export-2009-06-13/libavcodec/h264.c 2009-06-13 22:44:42.000000000 +0200
diff -Naur ffmpeg-export-2009-10-03.orig/libavcodec/h264.c ffmpeg-export-2009-10-03/libavcodec/h264.c
--- ffmpeg-export-2009-10-03.orig/libavcodec/h264.c 2009-10-03 20:07:16.000000000 +0200
+++ ffmpeg-export-2009-10-03/libavcodec/h264.c 2009-10-03 20:07:32.000000000 +0200
@@ -35,6 +35,7 @@
#include "golomb.h"
#include "mathops.h"
@ -737,7 +735,7 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/h264.c ffmpeg-export-2009-06
prefetch_motion(h, 0);
if(IS_16X16(mb_type)){
@@ -2205,7 +2361,7 @@
@@ -2208,7 +2364,7 @@
if(avctx->extradata_size > 0 && avctx->extradata &&
*(char *)avctx->extradata == 1){
h->is_avc = 1;
@ -746,7 +744,7 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/h264.c ffmpeg-export-2009-06
} else {
h->is_avc = 0;
}
@@ -2223,6 +2379,109 @@
@@ -2226,6 +2382,109 @@
return 0;
}
@ -856,7 +854,7 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/h264.c ffmpeg-export-2009-06
static int frame_start(H264Context *h){
MpegEncContext * const s = &h->s;
int i;
@@ -2254,11 +2513,11 @@
@@ -2258,11 +2517,11 @@
/* can't be in alloc_tables because linesize isn't known there.
* FIXME: redo bipred weight to not require extra buffer? */
for(i = 0; i < s->avctx->thread_count; i++)
@ -870,7 +868,7 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/h264.c ffmpeg-export-2009-06
memset(h->slice_table, -1, (s->mb_height*s->mb_stride-1) * sizeof(*h->slice_table));
// s->decode= (s->flags&CODEC_FLAG_PSNR) || !s->encoding || s->current_picture.reference /*|| h->contains_intra*/ || 1;
@@ -2274,11 +2533,147 @@
@@ -2278,11 +2537,147 @@
s->current_picture_ptr->field_poc[0]=
s->current_picture_ptr->field_poc[1]= INT_MAX;
@ -1018,7 +1016,7 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/h264.c ffmpeg-export-2009-06
static inline void backup_mb_border(H264Context *h, uint8_t *src_y, uint8_t *src_cb, uint8_t *src_cr, int linesize, int uvlinesize, int simple){
MpegEncContext * const s = &h->s;
int i;
@@ -3624,19 +4019,22 @@
@@ -3629,19 +4024,22 @@
AVCodecContext * const avctx= s->avctx;
s->mb_y= 0;
@ -1049,7 +1047,7 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/h264.c ffmpeg-export-2009-06
if (avctx->hwaccel) {
if (avctx->hwaccel->end_frame(avctx) < 0)
@@ -3796,8 +4194,10 @@
@@ -3801,8 +4199,10 @@
if (s->context_initialized
&& ( s->width != s->avctx->width || s->height != s->avctx->height)) {
@ -1061,7 +1059,7 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/h264.c ffmpeg-export-2009-06
free_tables(h);
flush_dpb(s->avctx);
MPV_common_end(s);
@@ -3813,20 +4213,25 @@
@@ -3818,20 +4218,25 @@
init_scan_tables(h);
alloc_tables(h);
@ -1100,7 +1098,7 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/h264.c ffmpeg-export-2009-06
s->avctx->width = s->width;
s->avctx->height = s->height;
@@ -3861,6 +4266,10 @@
@@ -3866,6 +4271,10 @@
h->mb_field_decoding_flag= s->picture_structure != PICT_FRAME;
if(h0->current_slice == 0){
@ -1111,7 +1109,7 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/h264.c ffmpeg-export-2009-06
while(h->frame_num != h->prev_frame_num &&
h->frame_num != (h->prev_frame_num+1)%(1<<h->sps.log2_max_frame_num)){
av_log(NULL, AV_LOG_DEBUG, "Frame num gap %d %d\n", h->frame_num, h->prev_frame_num);
@@ -3869,6 +4278,8 @@
@@ -3874,6 +4283,8 @@
h->prev_frame_num++;
h->prev_frame_num %= 1<<h->sps.log2_max_frame_num;
s->current_picture_ptr->frame_num= h->prev_frame_num;
@ -1120,7 +1118,7 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/h264.c ffmpeg-export-2009-06
execute_ref_pic_marking(h, NULL, 0);
}
@@ -4002,6 +4413,7 @@
@@ -4007,6 +4418,7 @@
if(h->slice_type_nos!=FF_I_TYPE && decode_ref_pic_list_reordering(h) < 0)
return -1;
@ -1128,7 +1126,7 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/h264.c ffmpeg-export-2009-06
if(h->slice_type_nos!=FF_I_TYPE){
s->last_picture_ptr= &h->ref_list[0][0];
ff_copy_picture(&s->last_picture, s->last_picture_ptr);
@@ -4010,6 +4422,7 @@
@@ -4015,6 +4427,7 @@
s->next_picture_ptr= &h->ref_list[1][0];
ff_copy_picture(&s->next_picture, s->next_picture_ptr);
}
@ -1136,7 +1134,7 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/h264.c ffmpeg-export-2009-06
if( (h->pps.weighted_pred && h->slice_type_nos == FF_P_TYPE )
|| (h->pps.weighted_bipred_idc==1 && h->slice_type_nos== FF_B_TYPE ) )
@@ -4126,11 +4539,15 @@
@@ -4131,11 +4544,15 @@
+(h->ref_list[j][i].reference&3);
}
@ -1153,7 +1151,7 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/h264.c ffmpeg-export-2009-06
if(s->avctx->debug&FF_DEBUG_PICT_INFO){
av_log(h->s.avctx, AV_LOG_DEBUG, "slice:%d %s mb:%d %c%s%s pps:%u frame:%d poc:%d/%d ref:%d/%d qp:%d loop:%d:%d:%d weight:%d%s %s\n",
h->slice_num,
@@ -6668,6 +7085,40 @@
@@ -6673,6 +7090,40 @@
#endif
}
@ -1194,7 +1192,7 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/h264.c ffmpeg-export-2009-06
static int decode_slice(struct AVCodecContext *avctx, void *arg){
H264Context *h = *(void**)arg;
MpegEncContext * const s = &h->s;
@@ -6729,7 +7180,7 @@
@@ -6734,7 +7185,7 @@
if( ++s->mb_x >= s->mb_width ) {
s->mb_x = 0;
@ -1203,7 +1201,7 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/h264.c ffmpeg-export-2009-06
++s->mb_y;
if(FIELD_OR_MBAFF_PICTURE) {
++s->mb_y;
@@ -6766,7 +7217,7 @@
@@ -6771,7 +7222,7 @@
if(++s->mb_x >= s->mb_width){
s->mb_x=0;
@ -1212,7 +1210,7 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/h264.c ffmpeg-export-2009-06
++s->mb_y;
if(FIELD_OR_MBAFF_PICTURE) {
++s->mb_y;
@@ -7473,7 +7924,7 @@
@@ -7483,7 +7934,7 @@
int context_count = 0;
int next_avc= h->is_avc ? 0 : buf_size;
@ -1221,7 +1219,7 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/h264.c ffmpeg-export-2009-06
#if 0
int i;
for(i=0; i<50; i++){
@@ -7702,7 +8153,9 @@
@@ -7715,7 +8166,9 @@
Picture *out;
int i, out_idx;
@ -1231,8 +1229,8 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/h264.c ffmpeg-export-2009-06
+//FIXME factorize this with the output code
out = h->delayed_pic[0];
out_idx = 0;
for(i=1; h->delayed_pic[i] && (h->delayed_pic[i]->poc && !h->delayed_pic[i]->key_frame); i++)
@@ -7722,7 +8175,7 @@
for(i=1; h->delayed_pic[i] && !h->delayed_pic[i]->key_frame && !h->delayed_pic[i]->mmco_reset; i++)
@@ -7735,7 +8188,7 @@
return 0;
}
@ -1241,7 +1239,7 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/h264.c ffmpeg-export-2009-06
int i, cnt, nalsize;
unsigned char *p = avctx->extradata;
if(avctx->extradata_size < 7) {
@@ -7760,13 +8213,13 @@
@@ -7773,13 +8226,13 @@
// Now store right nal length size, that will be use to parse all other nals
h->nal_length_size = ((*(((char*)(avctx->extradata))+4))&0x03)+1;
// Do not reparse avcC
@ -1258,7 +1256,7 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/h264.c ffmpeg-export-2009-06
}
buf_index=decode_nal_units(h, buf, buf_size);
@@ -7780,12 +8233,21 @@
@@ -7793,12 +8246,21 @@
}
if(!(s->flags2 & CODEC_FLAG2_CHUNKS) || (s->mb_y >= s->mb_height && s->mb_height)){
@ -1283,7 +1281,7 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/h264.c ffmpeg-export-2009-06
if (cur->field_poc[0]==INT_MAX || cur->field_poc[1]==INT_MAX) {
/* Wait for second field. */
*data_size = 0;
@@ -7915,6 +8377,7 @@
@@ -7928,6 +8390,7 @@
av_log(avctx, AV_LOG_DEBUG, "no picture\n");
}
}
@ -1291,7 +1289,7 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/h264.c ffmpeg-export-2009-06
}
assert(pict->data[0] || !*data_size);
@@ -8158,10 +8621,11 @@
@@ -8169,10 +8632,11 @@
NULL,
decode_end,
decode_frame,
@ -1304,9 +1302,9 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/h264.c ffmpeg-export-2009-06
};
#if CONFIG_H264_VDPAU_DECODER
diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/h264.h ffmpeg-export-2009-06-13/libavcodec/h264.h
--- ffmpeg-export-2009-06-13.orig/libavcodec/h264.h 2009-06-13 21:35:05.000000000 +0200
+++ ffmpeg-export-2009-06-13/libavcodec/h264.h 2009-06-13 22:24:17.000000000 +0200
diff -Naur ffmpeg-export-2009-10-03.orig/libavcodec/h264.h ffmpeg-export-2009-10-03/libavcodec/h264.h
--- ffmpeg-export-2009-10-03.orig/libavcodec/h264.h 2009-10-03 20:07:16.000000000 +0200
+++ ffmpeg-export-2009-10-03/libavcodec/h264.h 2009-10-03 20:07:32.000000000 +0200
@@ -250,7 +250,7 @@
* Used to parse AVC variant of h264
*/
@ -1324,9 +1322,9 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/h264.h ffmpeg-export-2009-06
int outputed_poc;
/**
diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/huffyuv.c ffmpeg-export-2009-06-13/libavcodec/huffyuv.c
--- ffmpeg-export-2009-06-13.orig/libavcodec/huffyuv.c 2009-06-13 21:35:05.000000000 +0200
+++ ffmpeg-export-2009-06-13/libavcodec/huffyuv.c 2009-06-13 22:24:17.000000000 +0200
diff -Naur ffmpeg-export-2009-10-03.orig/libavcodec/huffyuv.c ffmpeg-export-2009-10-03/libavcodec/huffyuv.c
--- ffmpeg-export-2009-10-03.orig/libavcodec/huffyuv.c 2009-10-03 20:07:16.000000000 +0200
+++ ffmpeg-export-2009-10-03/libavcodec/huffyuv.c 2009-10-03 20:07:32.000000000 +0200
@@ -32,6 +32,7 @@
#include "get_bits.h"
#include "put_bits.h"
@ -1335,7 +1333,7 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/huffyuv.c ffmpeg-export-2009
#define VLC_BITS 11
@@ -557,6 +558,28 @@
@@ -564,6 +565,28 @@
return 0;
}
@ -1364,7 +1362,7 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/huffyuv.c ffmpeg-export-2009
#endif /* CONFIG_HUFFYUV_DECODER || CONFIG_FFVHUFF_DECODER */
#if CONFIG_HUFFYUV_ENCODER || CONFIG_FFVHUFF_ENCODER
@@ -966,10 +989,10 @@
@@ -986,10 +1009,10 @@
s->dsp.bswap_buf((uint32_t*)s->bitstream_buffer, (const uint32_t*)buf, buf_size/4);
if(p->data[0])
@ -1377,7 +1375,7 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/huffyuv.c ffmpeg-export-2009
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}
@@ -1436,8 +1459,9 @@
@@ -1456,8 +1479,9 @@
NULL,
decode_end,
decode_frame,
@ -1388,7 +1386,7 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/huffyuv.c ffmpeg-export-2009
.long_name = NULL_IF_CONFIG_SMALL("Huffyuv / HuffYUV"),
};
#endif
@@ -1452,8 +1476,9 @@
@@ -1472,8 +1496,9 @@
NULL,
decode_end,
decode_frame,
@ -1399,9 +1397,9 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/huffyuv.c ffmpeg-export-2009
.long_name = NULL_IF_CONFIG_SMALL("Huffyuv FFmpeg variant"),
};
#endif
diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/mdec.c ffmpeg-export-2009-06-13/libavcodec/mdec.c
--- ffmpeg-export-2009-06-13.orig/libavcodec/mdec.c 2009-06-13 21:35:05.000000000 +0200
+++ ffmpeg-export-2009-06-13/libavcodec/mdec.c 2009-06-13 22:24:17.000000000 +0200
diff -Naur ffmpeg-export-2009-10-03.orig/libavcodec/mdec.c ffmpeg-export-2009-10-03/libavcodec/mdec.c
--- ffmpeg-export-2009-10-03.orig/libavcodec/mdec.c 2009-10-03 20:07:16.000000000 +0200
+++ ffmpeg-export-2009-10-03/libavcodec/mdec.c 2009-10-03 20:07:32.000000000 +0200
@@ -31,6 +31,7 @@
#include "dsputil.h"
#include "mpegvideo.h"
@ -1410,7 +1408,7 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/mdec.c ffmpeg-export-2009-06
typedef struct MDECContext{
AVCodecContext *avctx;
@@ -164,10 +165,10 @@
@@ -162,10 +163,10 @@
int i;
if(p->data[0])
@ -1423,7 +1421,7 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/mdec.c ffmpeg-export-2009-06
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}
@@ -238,6 +239,18 @@
@@ -236,6 +237,18 @@
return 0;
}
@ -1442,7 +1440,7 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/mdec.c ffmpeg-export-2009-06
static av_cold int decode_end(AVCodecContext *avctx){
MDECContext * const a = avctx->priv_data;
@@ -257,7 +270,8 @@
@@ -255,7 +268,8 @@
NULL,
decode_end,
decode_frame,
@ -1452,9 +1450,9 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/mdec.c ffmpeg-export-2009-06
+ .init_copy= ONLY_IF_THREADS_ENABLED(decode_init_copy)
};
diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/mimic.c ffmpeg-export-2009-06-13/libavcodec/mimic.c
--- ffmpeg-export-2009-06-13.orig/libavcodec/mimic.c 2009-06-13 21:35:05.000000000 +0200
+++ ffmpeg-export-2009-06-13/libavcodec/mimic.c 2009-06-13 22:24:17.000000000 +0200
diff -Naur ffmpeg-export-2009-10-03.orig/libavcodec/mimic.c ffmpeg-export-2009-10-03/libavcodec/mimic.c
--- ffmpeg-export-2009-10-03.orig/libavcodec/mimic.c 2009-10-03 20:07:16.000000000 +0200
+++ ffmpeg-export-2009-10-03/libavcodec/mimic.c 2009-10-03 20:07:32.000000000 +0200
@@ -27,6 +27,7 @@
#include "get_bits.h"
#include "bytestream.h"
@ -1600,9 +1598,9 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/mimic.c ffmpeg-export-2009-0
.long_name = NULL_IF_CONFIG_SMALL("Mimic"),
+ .update_context = ONLY_IF_THREADS_ENABLED(mimic_decode_update_context)
};
diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/mpeg12.c ffmpeg-export-2009-06-13/libavcodec/mpeg12.c
--- ffmpeg-export-2009-06-13.orig/libavcodec/mpeg12.c 2009-06-13 21:35:05.000000000 +0200
+++ ffmpeg-export-2009-06-13/libavcodec/mpeg12.c 2009-06-13 22:24:17.000000000 +0200
diff -Naur ffmpeg-export-2009-10-03.orig/libavcodec/mpeg12.c ffmpeg-export-2009-10-03/libavcodec/mpeg12.c
--- ffmpeg-export-2009-10-03.orig/libavcodec/mpeg12.c 2009-10-03 20:07:16.000000000 +0200
+++ ffmpeg-export-2009-10-03/libavcodec/mpeg12.c 2009-10-03 20:07:32.000000000 +0200
@@ -37,6 +37,7 @@
#include "bytestream.h"
#include "vdpau_internal.h"
@ -1715,9 +1713,9 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/mpeg12.c ffmpeg-export-2009-
return -1;
if( !(avctx->slice_flags & SLICE_FLAG_CODED_ORDER) )
return -1;
diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/mpegvideo.c ffmpeg-export-2009-06-13/libavcodec/mpegvideo.c
--- ffmpeg-export-2009-06-13.orig/libavcodec/mpegvideo.c 2009-06-13 21:35:05.000000000 +0200
+++ ffmpeg-export-2009-06-13/libavcodec/mpegvideo.c 2009-06-13 22:30:22.000000000 +0200
diff -Naur ffmpeg-export-2009-10-03.orig/libavcodec/mpegvideo.c ffmpeg-export-2009-10-03/libavcodec/mpegvideo.c
--- ffmpeg-export-2009-10-03.orig/libavcodec/mpegvideo.c 2009-10-03 20:07:16.000000000 +0200
+++ ffmpeg-export-2009-10-03/libavcodec/mpegvideo.c 2009-10-03 20:13:44.000000000 +0200
@@ -35,6 +35,7 @@
#include "msmpeg4.h"
#include "faandct.h"
@ -1846,13 +1844,13 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/mpegvideo.c ffmpeg-export-20
return -1;
}
@@ -553,8 +632,9 @@
CHECKED_ALLOCZ(s->dct_offset, 2 * 64 * sizeof(uint16_t))
FF_ALLOCZ_OR_GOTO(s->avctx, s->dct_offset, 2 * 64 * sizeof(uint16_t), fail)
}
}
- CHECKED_ALLOCZ(s->picture, MAX_PICTURE_COUNT * sizeof(Picture))
- FF_ALLOCZ_OR_GOTO(s->avctx, s->picture, MAX_PICTURE_COUNT * sizeof(Picture), fail)
- for(i = 0; i < MAX_PICTURE_COUNT; i++) {
+ s->picture_count = MAX_PICTURE_COUNT * FFMAX(1, s->avctx->thread_count);
+ CHECKED_ALLOCZ(s->picture, s->picture_count * sizeof(Picture))
+ FF_ALLOCZ_OR_GOTO(s->avctx, s->picture, s->picture_count * sizeof(Picture), fail)
+ for(i = 0; i < s->picture_count; i++) {
avcodec_get_frame_defaults((AVFrame *)&s->picture[i]);
}
@ -2131,9 +2129,9 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/mpegvideo.c ffmpeg-export-20
+ if (s->pict_type != FF_B_TYPE && !s->partitioned_frame)
+ ff_report_frame_progress((AVFrame*)s->current_picture_ptr, s->mb_y);
+}
diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/mpegvideo_enc.c ffmpeg-export-2009-06-13/libavcodec/mpegvideo_enc.c
--- ffmpeg-export-2009-06-13.orig/libavcodec/mpegvideo_enc.c 2009-06-13 21:35:05.000000000 +0200
+++ ffmpeg-export-2009-06-13/libavcodec/mpegvideo_enc.c 2009-06-13 22:24:17.000000000 +0200
diff -Naur ffmpeg-export-2009-10-03.orig/libavcodec/mpegvideo_enc.c ffmpeg-export-2009-10-03/libavcodec/mpegvideo_enc.c
--- ffmpeg-export-2009-10-03.orig/libavcodec/mpegvideo_enc.c 2009-10-03 20:07:16.000000000 +0200
+++ ffmpeg-export-2009-10-03/libavcodec/mpegvideo_enc.c 2009-10-03 20:07:32.000000000 +0200
@@ -35,6 +35,7 @@
#include "msmpeg4.h"
#include "h263.h"
@ -2142,7 +2140,7 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/mpegvideo_enc.c ffmpeg-expor
#include "aandcttab.h"
#include <limits.h>
@@ -1187,9 +1188,9 @@
@@ -1192,9 +1193,9 @@
{
MpegEncContext *s = avctx->priv_data;
AVFrame *pic_arg = data;
@ -2154,7 +2152,7 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/mpegvideo_enc.c ffmpeg-expor
int start_y= s->thread_context[i]->start_mb_y;
int end_y= s->thread_context[i]-> end_mb_y;
int h= s->mb_height;
@@ -1251,7 +1252,7 @@
@@ -1256,7 +1257,7 @@
s->last_non_b_time= s->time - s->pp_time;
}
// av_log(NULL, AV_LOG_ERROR, "R:%d ", s->next_lambda);
@ -2163,7 +2161,7 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/mpegvideo_enc.c ffmpeg-expor
PutBitContext *pb= &s->thread_context[i]->pb;
init_put_bits(pb, pb->buf, pb->buf_end - pb->buf);
}
@@ -2716,6 +2717,7 @@
@@ -2720,6 +2721,7 @@
{
int i;
int bits;
@ -2171,7 +2169,7 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/mpegvideo_enc.c ffmpeg-expor
s->picture_number = picture_number;
@@ -2755,7 +2757,7 @@
@@ -2759,7 +2761,7 @@
}
s->mb_intra=0; //for the rate distortion & bit compare functions
@ -2180,7 +2178,7 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/mpegvideo_enc.c ffmpeg-expor
ff_update_duplicate_context(s->thread_context[i], s);
}
@@ -2768,11 +2770,11 @@
@@ -2772,11 +2774,11 @@
s->lambda2= (s->lambda2* (int64_t)s->avctx->me_penalty_compensation + 128)>>8;
if(s->pict_type != FF_B_TYPE && s->avctx->me_threshold==0){
if((s->avctx->pre_me && s->last_non_b_pict_type==FF_I_TYPE) || s->avctx->pre_me==2){
@ -2194,7 +2192,7 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/mpegvideo_enc.c ffmpeg-expor
}else /* if(s->pict_type == FF_I_TYPE) */{
/* I-Frame */
for(i=0; i<s->mb_stride*s->mb_height; i++)
@@ -2780,10 +2782,10 @@
@@ -2784,10 +2786,10 @@
if(!s->fixed_qscale){
/* finding spatial complexity for I-frame rate control */
@ -2207,7 +2205,7 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/mpegvideo_enc.c ffmpeg-expor
merge_context_after_me(s, s->thread_context[i]);
}
s->current_picture.mc_mb_var_sum= s->current_picture_ptr->mc_mb_var_sum= s->me.mc_mb_var_sum_temp;
@@ -2917,11 +2919,11 @@
@@ -2921,11 +2923,11 @@
bits= put_bits_count(&s->pb);
s->header_bits= bits - s->last_bits;
@ -2222,10 +2220,10 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/mpegvideo_enc.c ffmpeg-expor
merge_context_after_encode(s, s->thread_context[i]);
}
emms_c();
diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/mpegvideo.h ffmpeg-export-2009-06-13/libavcodec/mpegvideo.h
--- ffmpeg-export-2009-06-13.orig/libavcodec/mpegvideo.h 2009-06-13 21:35:05.000000000 +0200
+++ ffmpeg-export-2009-06-13/libavcodec/mpegvideo.h 2009-06-13 22:24:17.000000000 +0200
@@ -122,6 +122,7 @@
diff -Naur ffmpeg-export-2009-10-03.orig/libavcodec/mpegvideo.h ffmpeg-export-2009-10-03/libavcodec/mpegvideo.h
--- ffmpeg-export-2009-10-03.orig/libavcodec/mpegvideo.h 2009-10-03 20:07:16.000000000 +0200
+++ ffmpeg-export-2009-10-03/libavcodec/mpegvideo.h 2009-10-03 20:07:32.000000000 +0200
@@ -123,6 +123,7 @@
int ref_poc[2][2][16]; ///< h264 POCs of the frames used as reference (FIXME need per slice)
int ref_count[2][2]; ///< number of entries in ref_poc (FIXME need per slice)
int mbaff; ///< h264 1 -> MBAFF frame 0-> not MBAFF
@ -2233,7 +2231,7 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/mpegvideo.h ffmpeg-export-20
int mb_var_sum; ///< sum of MB variance for current frame
int mc_mb_var_sum; ///< motion compensated MB variance for current frame
@@ -246,6 +247,9 @@
@@ -247,6 +248,9 @@
Picture **input_picture; ///< next pictures on display order for encoding
Picture **reordered_input_picture; ///< pointer to the next pictures in codedorder for encoding
@ -2243,7 +2241,7 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/mpegvideo.h ffmpeg-export-20
int start_mb_y; ///< start mb_y of this thread (so current thread should process start_mb_y <= row < end_mb_y)
int end_mb_y; ///< end mb_y of this thread (so current thread should process start_mb_y <= row < end_mb_y)
struct MpegEncContext *thread_context[MAX_THREADS];
@@ -674,6 +678,7 @@
@@ -675,6 +679,7 @@
void (*denoise_dct)(struct MpegEncContext *s, DCTELEM *block);
} MpegEncContext;
@ -2251,7 +2249,7 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/mpegvideo.h ffmpeg-export-20
void MPV_decode_defaults(MpegEncContext *s);
int MPV_common_init(MpegEncContext *s);
@@ -698,6 +703,9 @@
@@ -699,6 +704,9 @@
int ff_find_unused_picture(MpegEncContext *s, int shared);
void ff_denoise_dct(MpegEncContext *s, DCTELEM *block);
void ff_update_duplicate_context(MpegEncContext *dst, MpegEncContext *src);
@ -2261,9 +2259,9 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/mpegvideo.h ffmpeg-export-20
const uint8_t *ff_find_start_code(const uint8_t *p, const uint8_t *end, uint32_t *state);
void ff_er_frame_start(MpegEncContext *s);
diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/options.c ffmpeg-export-2009-06-13/libavcodec/options.c
--- ffmpeg-export-2009-06-13.orig/libavcodec/options.c 2009-06-13 21:35:05.000000000 +0200
+++ ffmpeg-export-2009-06-13/libavcodec/options.c 2009-06-13 22:24:17.000000000 +0200
diff -Naur ffmpeg-export-2009-10-03.orig/libavcodec/options.c ffmpeg-export-2009-10-03/libavcodec/options.c
--- ffmpeg-export-2009-10-03.orig/libavcodec/options.c 2009-10-03 20:07:16.000000000 +0200
+++ ffmpeg-export-2009-10-03/libavcodec/options.c 2009-10-03 20:07:32.000000000 +0200
@@ -401,6 +401,9 @@
{"colorspace", NULL, OFFSET(colorspace), FF_OPT_TYPE_INT, AVCOL_SPC_UNSPECIFIED, 1, AVCOL_SPC_NB-1, V|E|D},
{"color_range", NULL, OFFSET(color_range), FF_OPT_TYPE_INT, AVCOL_RANGE_UNSPECIFIED, 0, AVCOL_RANGE_NB-1, V|E|D},
@ -2274,9 +2272,9 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/options.c ffmpeg-export-2009
{NULL},
};
diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/os2thread.c ffmpeg-export-2009-06-13/libavcodec/os2thread.c
--- ffmpeg-export-2009-06-13.orig/libavcodec/os2thread.c 2009-06-13 21:35:05.000000000 +0200
+++ ffmpeg-export-2009-06-13/libavcodec/os2thread.c 2009-06-13 22:24:17.000000000 +0200
diff -Naur ffmpeg-export-2009-10-03.orig/libavcodec/os2thread.c ffmpeg-export-2009-10-03/libavcodec/os2thread.c
--- ffmpeg-export-2009-10-03.orig/libavcodec/os2thread.c 2009-10-03 20:07:16.000000000 +0200
+++ ffmpeg-export-2009-10-03/libavcodec/os2thread.c 2009-10-03 20:07:32.000000000 +0200
@@ -114,7 +114,13 @@
ThreadContext *c;
uint32_t threadid;
@ -2291,9 +2289,9 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/os2thread.c ffmpeg-export-20
assert(!s->thread_opaque);
c= av_mallocz(sizeof(ThreadContext)*thread_count);
diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/pthread.c ffmpeg-export-2009-06-13/libavcodec/pthread.c
--- ffmpeg-export-2009-06-13.orig/libavcodec/pthread.c 2009-06-13 21:35:05.000000000 +0200
+++ ffmpeg-export-2009-06-13/libavcodec/pthread.c 2009-06-13 22:24:17.000000000 +0200
diff -Naur ffmpeg-export-2009-10-03.orig/libavcodec/pthread.c ffmpeg-export-2009-10-03/libavcodec/pthread.c
--- ffmpeg-export-2009-10-03.orig/libavcodec/pthread.c 2009-10-03 20:07:16.000000000 +0200
+++ ffmpeg-export-2009-10-03/libavcodec/pthread.c 2009-10-03 20:07:32.000000000 +0200
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2004 Roman Shaposhnik
@ -2916,10 +2914,10 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/pthread.c ffmpeg-export-2009
+ else
+ thread_free(avctx);
+}
diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/snow.c ffmpeg-export-2009-06-13/libavcodec/snow.c
--- ffmpeg-export-2009-06-13.orig/libavcodec/snow.c 2009-06-13 21:35:05.000000000 +0200
+++ ffmpeg-export-2009-06-13/libavcodec/snow.c 2009-06-13 22:24:17.000000000 +0200
@@ -4132,9 +4132,9 @@
diff -Naur ffmpeg-export-2009-10-03.orig/libavcodec/snow.c ffmpeg-export-2009-10-03/libavcodec/snow.c
--- ffmpeg-export-2009-10-03.orig/libavcodec/snow.c 2009-10-03 20:07:16.000000000 +0200
+++ ffmpeg-export-2009-10-03/libavcodec/snow.c 2009-10-03 20:07:32.000000000 +0200
@@ -2648,9 +2648,9 @@
int h= s->avctx->height;
if(s->current_picture.data[0]){
@ -2932,9 +2930,9 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/snow.c ffmpeg-export-2009-06
}
release_buffer(s->avctx);
diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/thread.h ffmpeg-export-2009-06-13/libavcodec/thread.h
--- ffmpeg-export-2009-06-13.orig/libavcodec/thread.h 1970-01-01 01:00:00.000000000 +0100
+++ ffmpeg-export-2009-06-13/libavcodec/thread.h 2009-06-13 22:24:17.000000000 +0200
diff -Naur ffmpeg-export-2009-10-03.orig/libavcodec/thread.h ffmpeg-export-2009-10-03/libavcodec/thread.h
--- ffmpeg-export-2009-10-03.orig/libavcodec/thread.h 1970-01-01 01:00:00.000000000 +0100
+++ ffmpeg-export-2009-10-03/libavcodec/thread.h 2009-10-03 20:07:32.000000000 +0200
@@ -0,0 +1,139 @@
+/*
+ * Multithreading support
@ -3075,9 +3073,9 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/thread.h ffmpeg-export-2009-
+#endif
+
+#endif /* AVCODEC_THREAD_H */
diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/utils.c ffmpeg-export-2009-06-13/libavcodec/utils.c
--- ffmpeg-export-2009-06-13.orig/libavcodec/utils.c 2009-06-13 21:35:05.000000000 +0200
+++ ffmpeg-export-2009-06-13/libavcodec/utils.c 2009-06-13 22:24:17.000000000 +0200
diff -Naur ffmpeg-export-2009-10-03.orig/libavcodec/utils.c ffmpeg-export-2009-10-03/libavcodec/utils.c
--- ffmpeg-export-2009-10-03.orig/libavcodec/utils.c 2009-10-03 20:07:16.000000000 +0200
+++ ffmpeg-export-2009-10-03/libavcodec/utils.c 2009-10-03 20:07:32.000000000 +0200
@@ -35,6 +35,7 @@
#include "dsputil.h"
#include "opt.h"
@ -3114,9 +3112,9 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/utils.c ffmpeg-export-2009-0
for(i=0; i<4; i++){
pic->data[i]=NULL;
@@ -480,7 +488,17 @@
avctx->codec = codec;
avctx->codec_id = codec->id;
@@ -490,7 +498,17 @@
goto free_and_end;
}
avctx->frame_number = 0;
- if(avctx->codec->init){
+
@ -3132,8 +3130,8 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/utils.c ffmpeg-export-2009-0
+ if(avctx->codec->init && !USE_FRAME_THREADING(avctx)){
ret = avctx->codec->init(avctx);
if (ret < 0) {
av_freep(&avctx->priv_data);
@@ -569,12 +587,15 @@
goto free_and_end;
@@ -581,12 +599,15 @@
AVPacket *avpkt)
{
int ret;
@ -3151,7 +3149,7 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/utils.c ffmpeg-export-2009-0
avpkt);
emms_c(); //needed to avoid an emms_c() call before every return;
@@ -672,11 +693,12 @@
@@ -684,11 +705,12 @@
if (HAVE_THREADS && avctx->thread_opaque)
avcodec_thread_free(avctx);
@ -3165,7 +3163,7 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/utils.c ffmpeg-export-2009-0
entangled_thread_counter--;
/* Release any user-supplied mutex. */
@@ -915,6 +937,8 @@
@@ -927,6 +949,8 @@
void avcodec_flush_buffers(AVCodecContext *avctx)
{
@ -3174,10 +3172,10 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/utils.c ffmpeg-export-2009-0
if(avctx->codec->flush)
avctx->codec->flush(avctx);
}
diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/w32thread.c ffmpeg-export-2009-06-13/libavcodec/w32thread.c
--- ffmpeg-export-2009-06-13.orig/libavcodec/w32thread.c 2009-06-13 21:35:05.000000000 +0200
+++ ffmpeg-export-2009-06-13/libavcodec/w32thread.c 2009-06-13 22:24:17.000000000 +0200
@@ -104,7 +104,13 @@
diff -Naur ffmpeg-export-2009-10-03.orig/libavcodec/w32thread.c ffmpeg-export-2009-10-03/libavcodec/w32thread.c
--- ffmpeg-export-2009-10-03.orig/libavcodec/w32thread.c 2009-10-03 20:07:16.000000000 +0200
+++ ffmpeg-export-2009-10-03/libavcodec/w32thread.c 2009-10-03 20:07:32.000000000 +0200
@@ -105,7 +105,13 @@
ThreadContext *c;
uint32_t threadid;
@ -3191,10 +3189,10 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/w32thread.c ffmpeg-export-20
assert(!s->thread_opaque);
c= av_mallocz(sizeof(ThreadContext)*thread_count);
diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/x86/dsputil_mmx.c ffmpeg-export-2009-06-13/libavcodec/x86/dsputil_mmx.c
--- ffmpeg-export-2009-06-13.orig/libavcodec/x86/dsputil_mmx.c 2009-06-13 21:35:05.000000000 +0200
+++ ffmpeg-export-2009-06-13/libavcodec/x86/dsputil_mmx.c 2009-06-13 22:24:17.000000000 +0200
@@ -785,7 +785,7 @@
diff -Naur ffmpeg-export-2009-10-03.orig/libavcodec/x86/dsputil_mmx.c ffmpeg-export-2009-10-03/libavcodec/x86/dsputil_mmx.c
--- ffmpeg-export-2009-10-03.orig/libavcodec/x86/dsputil_mmx.c 2009-10-03 20:07:16.000000000 +0200
+++ ffmpeg-export-2009-10-03/libavcodec/x86/dsputil_mmx.c 2009-10-03 20:07:32.000000000 +0200
@@ -807,7 +807,7 @@
/* draw the edges of width 'w' of an image of size width, height
this mmx version can only handle w==8 || w==16 */
@ -3203,7 +3201,7 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/x86/dsputil_mmx.c ffmpeg-exp
{
uint8_t *ptr, *last_line;
int i;
@@ -840,34 +840,39 @@
@@ -862,34 +862,39 @@
for(i=0;i<w;i+=4) {
/* top and bottom (and hopefully also the corners) */
@ -3271,10 +3269,10 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavcodec/x86/dsputil_mmx.c ffmpeg-exp
}
}
diff -Naur ffmpeg-export-2009-06-13.orig/libavutil/internal.h ffmpeg-export-2009-06-13/libavutil/internal.h
--- ffmpeg-export-2009-06-13.orig/libavutil/internal.h 2009-06-13 21:35:05.000000000 +0200
+++ ffmpeg-export-2009-06-13/libavutil/internal.h 2009-06-13 22:24:17.000000000 +0200
@@ -328,4 +328,10 @@
diff -Naur ffmpeg-export-2009-10-03.orig/libavutil/internal.h ffmpeg-export-2009-10-03/libavutil/internal.h
--- ffmpeg-export-2009-10-03.orig/libavutil/internal.h 2009-10-03 20:07:16.000000000 +0200
+++ ffmpeg-export-2009-10-03/libavutil/internal.h 2009-10-03 20:07:32.000000000 +0200
@@ -327,4 +327,10 @@
# define NULL_IF_CONFIG_SMALL(x) x
#endif
@ -3285,9 +3283,9 @@ diff -Naur ffmpeg-export-2009-06-13.orig/libavutil/internal.h ffmpeg-export-2009
+#endif
+
#endif /* AVUTIL_INTERNAL_H */
diff -Naur ffmpeg-export-2009-06-13.orig/libavutil/log.c ffmpeg-export-2009-06-13/libavutil/log.c
--- ffmpeg-export-2009-06-13.orig/libavutil/log.c 2009-06-13 21:35:05.000000000 +0200
+++ ffmpeg-export-2009-06-13/libavutil/log.c 2009-06-13 22:24:17.000000000 +0200
diff -Naur ffmpeg-export-2009-10-03.orig/libavutil/log.c ffmpeg-export-2009-10-03/libavutil/log.c
--- ffmpeg-export-2009-10-03.orig/libavutil/log.c 2009-10-03 20:07:16.000000000 +0200
+++ ffmpeg-export-2009-10-03/libavutil/log.c 2009-10-03 20:07:32.000000000 +0200
@@ -35,6 +35,8 @@
static int count;
static char line[1024], prev[1024];

View File

@ -1 +1 @@
http://sources.openelec.tv/svn/ffmpeg-20090809.tar.bz2
http://sources.openelec.tv/svn/ffmpeg-20091004.tar.bz2

View File

@ -4,7 +4,7 @@
$SCRIPTS/build toolchain
$SCRIPTS/build sqlite
$SCRIPTS/build ffmpeg-mt
$SCRIPTS/build ffmpeg
$SCRIPTS/build libexif
$SCRIPTS/build libxml2
$SCRIPTS/build libnfo

View File

@ -3,7 +3,7 @@
. config/options
$SCRIPTS/install sqlite
$SCRIPTS/install ffmpeg-mt
$SCRIPTS/install ffmpeg
$SCRIPTS/install libexif
$SCRIPTS/install libxml2
$SCRIPTS/install libnfo