mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
Merge commit 'b2c087871dafc7d030b2d48457ddff597dfd4925'
* commit 'b2c087871dafc7d030b2d48457ddff597dfd4925': Move x86util.asm from libavcodec/ to libavutil/. Move x86inc.asm to libavutil/. APIchanges: note error_recognition in lavf lavf: add support for error_recognition, use it in avidec, and bump minor API version avconv: change semantics of -map avconv: get rid of new* options. cmdutils: allow precisely specifying a stream for AVOptions. configure: add missing CFLAGS to fix building on the HURD libx264: Include hint for possible values for configuring libx264 cmdutils: allow ':'-separated modifiers in option names. avconv: make -map_metadata work consistently with the other options avconv: remove deprecated options. avconv: make -map_chapters accept only the input file index. Make a copy of ffmpeg under a new name -- avconv. ffmpeg: add a warning stating that the program is deprecated. Add weighted motion compensation for RV40 B-frames RV3/4: calculate B-frame motion weights once per frame Move RV3/4-specific DSP functions into their own context mjpeg: propagate decode errors from ff_mjpeg_decode_sos and ff_mjpeg_decode_dqt h264: notice memory allocation failure Conflicts: .gitignore Makefile cmdutils.c configure doc/ffplay.texi doc/ffprobe.texi doc/ffserver.texi libavcodec/libx264.c libavformat/avformat.h libavformat/avidec.c libavformat/version.h tests/lavf-regression.sh tests/lavfi-regression.sh Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
0cb233cf46
1
.gitignore
vendored
1
.gitignore
vendored
@ -16,6 +16,7 @@ ffmpeg
|
||||
ffplay
|
||||
ffprobe
|
||||
ffserver
|
||||
avconv
|
||||
libavcodec/*_tablegen
|
||||
libavcodec/*_tables.c
|
||||
libavcodec/*_tables.h
|
||||
|
3
Makefile
3
Makefile
@ -10,6 +10,7 @@ vpath %.texi $(SRC_PATH)
|
||||
|
||||
|
||||
PROGS-$(CONFIG_FFMPEG) += ffmpeg
|
||||
PROGS-$(CONFIG_AVCONV) += avconv
|
||||
PROGS-$(CONFIG_FFPLAY) += ffplay
|
||||
PROGS-$(CONFIG_FFPROBE) += ffprobe
|
||||
PROGS-$(CONFIG_FFSERVER) += ffserver
|
||||
@ -22,7 +23,7 @@ HOSTPROGS := $(TESTTOOLS:%=tests/%)
|
||||
TOOLS = qt-faststart trasher
|
||||
TOOLS-$(CONFIG_ZLIB) += cws2fws
|
||||
|
||||
BASENAMES = ffmpeg ffplay ffprobe ffserver
|
||||
BASENAMES = ffmpeg avconv ffplay ffprobe ffserver
|
||||
ALLPROGS = $(BASENAMES:%=%$(EXESUF))
|
||||
ALLPROGS_G = $(BASENAMES:%=%_g$(EXESUF))
|
||||
ALLMANPAGES = $(BASENAMES:%=%.1)
|
||||
|
73
cmdutils.c
73
cmdutils.c
@ -141,8 +141,11 @@ void show_help_options(const OptionDef *options, const char *msg, int mask, int
|
||||
}
|
||||
|
||||
static const OptionDef* find_option(const OptionDef *po, const char *name){
|
||||
const char *p = strchr(name, ':');
|
||||
int len = p ? p - name : strlen(name);
|
||||
|
||||
while (po->name != NULL) {
|
||||
if (!strcmp(name, po->name))
|
||||
if (!strncmp(name, po->name, len) && strlen(po->name) == len)
|
||||
break;
|
||||
po++;
|
||||
}
|
||||
@ -288,7 +291,14 @@ unknown_opt:
|
||||
int opt_default(const char *opt, const char *arg)
|
||||
{
|
||||
const AVOption *oc, *of, *os;
|
||||
if ((oc = av_opt_find(avcodec_opts[0], opt, NULL, 0, AV_OPT_SEARCH_CHILDREN)) ||
|
||||
char opt_stripped[128];
|
||||
const char *p;
|
||||
|
||||
if (!(p = strchr(opt, ':')))
|
||||
p = opt + strlen(opt);
|
||||
av_strlcpy(opt_stripped, opt, FFMIN(sizeof(opt_stripped), p - opt + 1));
|
||||
|
||||
if ((oc = av_opt_find(avcodec_opts[0], opt_stripped, NULL, 0, AV_OPT_SEARCH_CHILDREN)) ||
|
||||
((opt[0] == 'v' || opt[0] == 'a' || opt[0] == 's') &&
|
||||
(oc = av_opt_find(avcodec_opts[0], opt+1, NULL, 0, 0))))
|
||||
av_dict_set(&codec_opts, opt, arg, FLAGS(oc));
|
||||
@ -741,9 +751,9 @@ FILE *get_preset_file(char *filename, size_t filename_size,
|
||||
{
|
||||
FILE *f = NULL;
|
||||
int i;
|
||||
const char *base[3]= { getenv("FFMPEG_DATADIR"),
|
||||
const char *base[3]= { getenv("AVCONV_DATADIR"),
|
||||
getenv("HOME"),
|
||||
FFMPEG_DATADIR,
|
||||
AVCONV_DATADIR,
|
||||
};
|
||||
|
||||
if (is_path) {
|
||||
@ -770,11 +780,11 @@ FILE *get_preset_file(char *filename, size_t filename_size,
|
||||
for (i = 0; i < 3 && !f; i++) {
|
||||
if (!base[i])
|
||||
continue;
|
||||
snprintf(filename, filename_size, "%s%s/%s.ffpreset", base[i], i != 1 ? "" : "/.ffmpeg", preset_name);
|
||||
snprintf(filename, filename_size, "%s%s/%s.ffpreset", base[i], i != 1 ? "" : "/.avconv", preset_name);
|
||||
f = fopen(filename, "r");
|
||||
if (!f && codec_name) {
|
||||
snprintf(filename, filename_size,
|
||||
"%s%s/%s-%s.ffpreset", base[i], i != 1 ? "" : "/.ffmpeg", codec_name, preset_name);
|
||||
"%s%s/%s-%s.ffpreset", base[i], i != 1 ? "" : "/.avconv", codec_name, preset_name);
|
||||
f = fopen(filename, "r");
|
||||
}
|
||||
}
|
||||
@ -783,12 +793,42 @@ FILE *get_preset_file(char *filename, size_t filename_size,
|
||||
return f;
|
||||
}
|
||||
|
||||
AVDictionary *filter_codec_opts(AVDictionary *opts, enum CodecID codec_id, int encoder)
|
||||
int check_stream_specifier(AVFormatContext *s, AVStream *st, const char *spec)
|
||||
{
|
||||
if (*spec <= '9' && *spec >= '0') /* opt:index */
|
||||
return strtol(spec, NULL, 0) == st->index;
|
||||
else if (*spec == 'v' || *spec == 'a' || *spec == 's' || *spec == 'd') { /* opt:[vasd] */
|
||||
enum AVMediaType type;
|
||||
|
||||
switch (*spec++) {
|
||||
case 'v': type = AVMEDIA_TYPE_VIDEO; break;
|
||||
case 'a': type = AVMEDIA_TYPE_AUDIO; break;
|
||||
case 's': type = AVMEDIA_TYPE_SUBTITLE; break;
|
||||
case 'd': type = AVMEDIA_TYPE_DATA; break;
|
||||
}
|
||||
if (type != st->codec->codec_type)
|
||||
return 0;
|
||||
if (*spec++ == ':') { /* possibly followed by :index */
|
||||
int i, index = strtol(spec, NULL, 0);
|
||||
for (i = 0; i < s->nb_streams; i++)
|
||||
if (s->streams[i]->codec->codec_type == type && index-- == 0)
|
||||
return i == st->index;
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
} else if (!*spec) /* empty specifier, matches everything */
|
||||
return 1;
|
||||
|
||||
av_log(s, AV_LOG_ERROR, "Invalid stream specifier: %s.\n", spec);
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
|
||||
AVDictionary *filter_codec_opts(AVDictionary *opts, enum CodecID codec_id, AVFormatContext *s, AVStream *st)
|
||||
{
|
||||
AVDictionary *ret = NULL;
|
||||
AVDictionaryEntry *t = NULL;
|
||||
AVCodec *codec = encoder ? avcodec_find_encoder(codec_id) : avcodec_find_decoder(codec_id);
|
||||
int flags = encoder ? AV_OPT_FLAG_ENCODING_PARAM : AV_OPT_FLAG_DECODING_PARAM;
|
||||
AVCodec *codec = s->oformat ? avcodec_find_encoder(codec_id) : avcodec_find_decoder(codec_id);
|
||||
int flags = s->oformat ? AV_OPT_FLAG_ENCODING_PARAM : AV_OPT_FLAG_DECODING_PARAM;
|
||||
char prefix = 0;
|
||||
|
||||
if (!codec)
|
||||
@ -801,11 +841,24 @@ AVDictionary *filter_codec_opts(AVDictionary *opts, enum CodecID codec_id, int e
|
||||
}
|
||||
|
||||
while (t = av_dict_get(opts, "", t, AV_DICT_IGNORE_SUFFIX)) {
|
||||
char *p = strchr(t->key, ':');
|
||||
|
||||
/* check stream specification in opt name */
|
||||
if (p)
|
||||
switch (check_stream_specifier(s, st, p + 1)) {
|
||||
case 1: *p = 0; break;
|
||||
case 0: continue;
|
||||
default: return NULL;
|
||||
}
|
||||
|
||||
if (av_opt_find(avcodec_opts[0], t->key, NULL, flags, 0) ||
|
||||
(codec && codec->priv_class && av_opt_find(&codec->priv_class, t->key, NULL, flags, 0)))
|
||||
av_dict_set(&ret, t->key, t->value, 0);
|
||||
else if (t->key[0] == prefix && av_opt_find(avcodec_opts[0], t->key+1, NULL, flags, 0))
|
||||
av_dict_set(&ret, t->key+1, t->value, 0);
|
||||
|
||||
if (p)
|
||||
*p = ':';
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@ -823,7 +876,7 @@ AVDictionary **setup_find_stream_info_opts(AVFormatContext *s, AVDictionary *cod
|
||||
return NULL;
|
||||
}
|
||||
for (i = 0; i < s->nb_streams; i++)
|
||||
opts[i] = filter_codec_opts(codec_opts, s->streams[i]->codec->codec_id, 0);
|
||||
opts[i] = filter_codec_opts(codec_opts, s->streams[i]->codec->codec_id, s, s->streams[i]);
|
||||
return opts;
|
||||
}
|
||||
|
||||
|
16
cmdutils.h
16
cmdutils.h
@ -152,16 +152,28 @@ void show_help_options(const OptionDef *options, const char *msg, int mask, int
|
||||
void parse_options(int argc, char **argv, const OptionDef *options,
|
||||
int (* parse_arg_function)(const char *opt, const char *arg));
|
||||
|
||||
/**
|
||||
* Check if the given stream matches a stream specifier.
|
||||
*
|
||||
* @param s Corresponding format context.
|
||||
* @param st Stream from s to be checked.
|
||||
* @param spec A stream specifier of the [v|a|s|d]:[<stream index>] form.
|
||||
*
|
||||
* @return 1 if the stream matches, 0 if it doesn't, <0 on error
|
||||
*/
|
||||
int check_stream_specifier(AVFormatContext *s, AVStream *st, const char *spec);
|
||||
|
||||
/**
|
||||
* Filter out options for given codec.
|
||||
*
|
||||
* Create a new options dictionary containing only the options from
|
||||
* opts which apply to the codec with ID codec_id.
|
||||
*
|
||||
* @param encoder if non-zero the codec is an encoder, otherwise is a decoder
|
||||
* @param s Corresponding format context.
|
||||
* @param st A stream from s for which the options should be filtered.
|
||||
* @return a pointer to the created dictionary
|
||||
*/
|
||||
AVDictionary *filter_codec_opts(AVDictionary *opts, enum CodecID codec_id, int encoder);
|
||||
AVDictionary *filter_codec_opts(AVDictionary *opts, enum CodecID codec_id, AVFormatContext *s, AVStream *st);
|
||||
|
||||
/**
|
||||
* Setup AVCodecContext options for avformat_find_stream_info().
|
||||
|
11
configure
vendored
11
configure
vendored
@ -65,7 +65,7 @@ Standard options:
|
||||
--disable-logging do not log configure debug information
|
||||
--prefix=PREFIX install in PREFIX [$prefix]
|
||||
--bindir=DIR install binaries in DIR [PREFIX/bin]
|
||||
--datadir=DIR install data files in DIR [PREFIX/share/ffmpeg]
|
||||
--datadir=DIR install data files in DIR [PREFIX/share/avconv]
|
||||
--libdir=DIR install libs in DIR [PREFIX/lib]
|
||||
--shlibdir=DIR install shared libs in DIR [PREFIX/lib]
|
||||
--incdir=DIR install includes in DIR [PREFIX/include]
|
||||
@ -81,6 +81,7 @@ Configuration options:
|
||||
and binaries will be unredistributable [no]
|
||||
--disable-doc do not build documentation
|
||||
--disable-ffmpeg disable ffmpeg build
|
||||
--disable-avconv disable avconv build
|
||||
--disable-ffplay disable ffplay build
|
||||
--disable-ffprobe disable ffprobe build
|
||||
--disable-ffserver disable ffserver build
|
||||
@ -917,6 +918,7 @@ CONFIG_LIST="
|
||||
dxva2
|
||||
fastdiv
|
||||
ffmpeg
|
||||
avconv
|
||||
ffplay
|
||||
ffprobe
|
||||
ffserver
|
||||
@ -1522,6 +1524,8 @@ postproc_deps="gpl"
|
||||
# programs
|
||||
ffmpeg_deps="avcodec avformat swscale"
|
||||
ffmpeg_select="buffer_filter buffersink_filter"
|
||||
av_deps="avcodec avformat swscale"
|
||||
av_select="buffer_filter"
|
||||
ffplay_deps="avcodec avformat swscale sdl"
|
||||
ffplay_select="buffersink_filter rdft"
|
||||
ffprobe_deps="avcodec avformat"
|
||||
@ -1628,7 +1632,7 @@ logfile="config.log"
|
||||
# installation paths
|
||||
prefix_default="/usr/local"
|
||||
bindir_default='${prefix}/bin'
|
||||
datadir_default='${prefix}/share/ffmpeg'
|
||||
datadir_default='${prefix}/share/avconv'
|
||||
incdir_default='${prefix}/include'
|
||||
libdir_default='${prefix}/lib'
|
||||
mandir_default='${prefix}/share/man'
|
||||
@ -1670,6 +1674,7 @@ enable debug
|
||||
enable doc
|
||||
enable fastdiv
|
||||
enable ffmpeg
|
||||
enable avconv
|
||||
enable ffplay
|
||||
enable ffprobe
|
||||
enable ffserver
|
||||
@ -2532,6 +2537,7 @@ case $target_os in
|
||||
add_cppflags -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_BSD_SOURCE
|
||||
;;
|
||||
gnu)
|
||||
add_cppflags -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600
|
||||
;;
|
||||
qnx)
|
||||
add_cppflags -D_QNX_SOURCE
|
||||
@ -3370,6 +3376,7 @@ cat > $TMPH <<EOF
|
||||
#define FFMPEG_CONFIGURATION "$(c_escape $FFMPEG_CONFIGURATION)"
|
||||
#define FFMPEG_LICENSE "$(c_escape $license)"
|
||||
#define FFMPEG_DATADIR "$(eval c_escape $datadir)"
|
||||
#define AVCONV_DATADIR "$(eval c_escape $datadir)"
|
||||
#define CC_TYPE "$cc_type"
|
||||
#define CC_VERSION $cc_version
|
||||
#define restrict $_restrict
|
||||
|
@ -13,6 +13,9 @@ libavutil: 2011-04-18
|
||||
|
||||
API changes, most recent first:
|
||||
|
||||
2011-08-06 - 2f63440 - lavf 53.4.0
|
||||
Add error_recognition to AVFormatContext.
|
||||
|
||||
2011-08-02 - 9d39cbf - lavc 53.7.1
|
||||
Add AV_PKT_FLAG_CORRUPT AVPacket flag.
|
||||
|
||||
|
1061
doc/avconv.texi
Normal file
1061
doc/avconv.texi
Normal file
File diff suppressed because it is too large
Load Diff
@ -114,5 +114,22 @@ muxer:
|
||||
ffmpeg -i input.flac -id3v2_version 3 out.mp3
|
||||
@end example
|
||||
|
||||
You can precisely specify which stream(s) should the codec AVOption apply to by
|
||||
appending a stream specifier of the form
|
||||
@option{[:@var{stream_type}][:@var{stream_index}]} to the option name.
|
||||
@var{stream_type} is 'v' for video, 'a' for audio and 's' for subtitle streams.
|
||||
@var{stream_index} is a global stream index when @var{stream_type} isn't
|
||||
given, otherwise it counts streams of the given type only. As always, the index
|
||||
is zero-based. For example
|
||||
@example
|
||||
-foo -- applies to all applicable streams
|
||||
-foo:v -- applies to all video streams
|
||||
-foo:a:2 -- applies to the third audio stream
|
||||
-foo:0 -- applies to the first stream
|
||||
@end example
|
||||
|
||||
Note -nooption syntax cannot be used for boolean AVOptions, use -option
|
||||
0/-option 1.
|
||||
|
||||
Note2 old undocumented way of specifying per-stream AVOptions by prepending
|
||||
v/a/s to the options name is now obsolete and will be removed soon.
|
||||
|
4
ffmpeg.c
4
ffmpeg.c
@ -723,7 +723,7 @@ static OutputStream *new_output_stream(AVFormatContext *oc, int file_idx, AVCode
|
||||
ost->st = st;
|
||||
ost->enc = codec;
|
||||
if (codec)
|
||||
ost->opts = filter_codec_opts(codec_opts, codec->id, 1);
|
||||
ost->opts = filter_codec_opts(codec_opts, codec->id, oc, st);
|
||||
|
||||
avcodec_get_context_defaults3(st->codec, codec);
|
||||
|
||||
@ -3427,7 +3427,7 @@ static int opt_input_file(const char *opt, const char *filename)
|
||||
ist->st = st;
|
||||
ist->file_index = nb_input_files;
|
||||
ist->discard = 1;
|
||||
ist->opts = filter_codec_opts(codec_opts, ist->st->codec->codec_id, 0);
|
||||
ist->opts = filter_codec_opts(codec_opts, ist->st->codec->codec_id, ic, st);
|
||||
|
||||
if (i < nb_ts_scale)
|
||||
ist->ts_scale = ts_scale[i];
|
||||
|
2
ffplay.c
2
ffplay.c
@ -2119,7 +2119,7 @@ static int stream_component_open(VideoState *is, int stream_index)
|
||||
return -1;
|
||||
avctx = ic->streams[stream_index]->codec;
|
||||
|
||||
opts = filter_codec_opts(codec_opts, avctx->codec_id, 0);
|
||||
opts = filter_codec_opts(codec_opts, avctx->codec_id, ic, ic->streams[stream_index]);
|
||||
|
||||
/* prepare audio output */
|
||||
if (avctx->codec_type == AVMEDIA_TYPE_AUDIO) {
|
||||
|
@ -1279,16 +1279,16 @@ static void wmv2_mspel8_h_lowpass(uint8_t *dst, uint8_t *src, int dstStride, int
|
||||
}
|
||||
|
||||
#if CONFIG_RV40_DECODER
|
||||
static void put_rv40_qpel16_mc33_c(uint8_t *dst, uint8_t *src, int stride){
|
||||
void ff_put_rv40_qpel16_mc33_c(uint8_t *dst, uint8_t *src, int stride){
|
||||
put_pixels16_xy2_8_c(dst, src, stride, 16);
|
||||
}
|
||||
static void avg_rv40_qpel16_mc33_c(uint8_t *dst, uint8_t *src, int stride){
|
||||
void ff_avg_rv40_qpel16_mc33_c(uint8_t *dst, uint8_t *src, int stride){
|
||||
avg_pixels16_xy2_8_c(dst, src, stride, 16);
|
||||
}
|
||||
static void put_rv40_qpel8_mc33_c(uint8_t *dst, uint8_t *src, int stride){
|
||||
void ff_put_rv40_qpel8_mc33_c(uint8_t *dst, uint8_t *src, int stride){
|
||||
put_pixels8_xy2_8_c(dst, src, stride, 8);
|
||||
}
|
||||
static void avg_rv40_qpel8_mc33_c(uint8_t *dst, uint8_t *src, int stride){
|
||||
void ff_avg_rv40_qpel8_mc33_c(uint8_t *dst, uint8_t *src, int stride){
|
||||
avg_pixels8_xy2_8_c(dst, src, stride, 8);
|
||||
}
|
||||
#endif /* CONFIG_RV40_DECODER */
|
||||
@ -2891,16 +2891,6 @@ av_cold void dsputil_init(DSPContext* c, AVCodecContext *avctx)
|
||||
#if CONFIG_WMV2_DECODER || CONFIG_VC1_DECODER
|
||||
ff_intrax8dsp_init(c,avctx);
|
||||
#endif
|
||||
#if CONFIG_RV30_DECODER
|
||||
ff_rv30dsp_init(c,avctx);
|
||||
#endif
|
||||
#if CONFIG_RV40_DECODER
|
||||
ff_rv40dsp_init(c,avctx);
|
||||
c->put_rv40_qpel_pixels_tab[0][15] = put_rv40_qpel16_mc33_c;
|
||||
c->avg_rv40_qpel_pixels_tab[0][15] = avg_rv40_qpel16_mc33_c;
|
||||
c->put_rv40_qpel_pixels_tab[1][15] = put_rv40_qpel8_mc33_c;
|
||||
c->avg_rv40_qpel_pixels_tab[1][15] = avg_rv40_qpel8_mc33_c;
|
||||
#endif
|
||||
|
||||
c->put_mspel_pixels_tab[0]= ff_put_pixels8x8_c;
|
||||
c->put_mspel_pixels_tab[1]= put_mspel8_mc10_c;
|
||||
@ -3108,16 +3098,6 @@ av_cold void dsputil_init(DSPContext* c, AVCodecContext *avctx)
|
||||
c->avg_2tap_qpel_pixels_tab[0][i]= c->avg_h264_qpel_pixels_tab[0][i];
|
||||
}
|
||||
|
||||
c->put_rv30_tpel_pixels_tab[0][0] = c->put_h264_qpel_pixels_tab[0][0];
|
||||
c->put_rv30_tpel_pixels_tab[1][0] = c->put_h264_qpel_pixels_tab[1][0];
|
||||
c->avg_rv30_tpel_pixels_tab[0][0] = c->avg_h264_qpel_pixels_tab[0][0];
|
||||
c->avg_rv30_tpel_pixels_tab[1][0] = c->avg_h264_qpel_pixels_tab[1][0];
|
||||
|
||||
c->put_rv40_qpel_pixels_tab[0][0] = c->put_h264_qpel_pixels_tab[0][0];
|
||||
c->put_rv40_qpel_pixels_tab[1][0] = c->put_h264_qpel_pixels_tab[1][0];
|
||||
c->avg_rv40_qpel_pixels_tab[0][0] = c->avg_h264_qpel_pixels_tab[0][0];
|
||||
c->avg_rv40_qpel_pixels_tab[1][0] = c->avg_h264_qpel_pixels_tab[1][0];
|
||||
|
||||
switch(c->idct_permutation_type){
|
||||
case FF_NO_IDCT_PERM:
|
||||
for(i=0; i<64; i++)
|
||||
|
@ -114,6 +114,12 @@ void ff_vp3_h_loop_filter_c(uint8_t *src, int stride, int *bounding_values);
|
||||
/* EA functions */
|
||||
void ff_ea_idct_put_c(uint8_t *dest, int linesize, DCTELEM *block);
|
||||
|
||||
/* RV40 functions */
|
||||
void ff_put_rv40_qpel16_mc33_c(uint8_t *dst, uint8_t *src, int stride);
|
||||
void ff_avg_rv40_qpel16_mc33_c(uint8_t *dst, uint8_t *src, int stride);
|
||||
void ff_put_rv40_qpel8_mc33_c(uint8_t *dst, uint8_t *src, int stride);
|
||||
void ff_avg_rv40_qpel8_mc33_c(uint8_t *dst, uint8_t *src, int stride);
|
||||
|
||||
/* 1/2^n downscaling functions from imgconvert.c */
|
||||
void ff_shrink22(uint8_t *dst, int dst_wrap, const uint8_t *src, int src_wrap, int width, int height);
|
||||
void ff_shrink44(uint8_t *dst, int dst_wrap, const uint8_t *src, int src_wrap, int width, int height);
|
||||
@ -540,16 +546,6 @@ typedef struct DSPContext {
|
||||
void (*vector_clip_int32)(int32_t *dst, const int32_t *src, int32_t min,
|
||||
int32_t max, unsigned int len);
|
||||
|
||||
/* rv30 functions */
|
||||
qpel_mc_func put_rv30_tpel_pixels_tab[4][16];
|
||||
qpel_mc_func avg_rv30_tpel_pixels_tab[4][16];
|
||||
|
||||
/* rv40 functions */
|
||||
qpel_mc_func put_rv40_qpel_pixels_tab[4][16];
|
||||
qpel_mc_func avg_rv40_qpel_pixels_tab[4][16];
|
||||
h264_chroma_mc_func put_rv40_chroma_pixels_tab[3];
|
||||
h264_chroma_mc_func avg_rv40_chroma_pixels_tab[3];
|
||||
|
||||
op_fill_func fill_block_tab[2];
|
||||
} DSPContext;
|
||||
|
||||
@ -624,8 +620,6 @@ void dsputil_init_sh4(DSPContext* c, AVCodecContext *avctx);
|
||||
void dsputil_init_vis(DSPContext* c, AVCodecContext *avctx);
|
||||
|
||||
void ff_dsputil_init_dwt(DSPContext *c);
|
||||
void ff_rv30dsp_init(DSPContext* c, AVCodecContext *avctx);
|
||||
void ff_rv40dsp_init(DSPContext* c, AVCodecContext *avctx);
|
||||
void ff_intrax8dsp_init(DSPContext* c, AVCodecContext *avctx);
|
||||
void ff_mlp_init(DSPContext* c, AVCodecContext *avctx);
|
||||
void ff_mlp_init_x86(DSPContext* c, AVCodecContext *avctx);
|
||||
|
@ -1138,7 +1138,10 @@ static int decode_update_thread_context(AVCodecContext *dst, const AVCodecContex
|
||||
memcpy(&h->s + 1, &h1->s + 1, sizeof(H264Context) - sizeof(MpegEncContext)); //copy all fields after MpegEnc
|
||||
memset(h->sps_buffers, 0, sizeof(h->sps_buffers));
|
||||
memset(h->pps_buffers, 0, sizeof(h->pps_buffers));
|
||||
ff_h264_alloc_tables(h);
|
||||
if (ff_h264_alloc_tables(h) < 0) {
|
||||
av_log(dst, AV_LOG_ERROR, "Could not allocate memory for h264\n");
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
context_init(h);
|
||||
|
||||
for(i=0; i<2; i++){
|
||||
@ -2619,7 +2622,10 @@ static int decode_slice_header(H264Context *h, H264Context *h0){
|
||||
h->prev_interlaced_frame = 1;
|
||||
|
||||
init_scan_tables(h);
|
||||
ff_h264_alloc_tables(h);
|
||||
if (ff_h264_alloc_tables(h) < 0) {
|
||||
av_log(h->s.avctx, AV_LOG_ERROR, "Could not allocate memory for h264\n");
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
|
||||
if (!HAVE_THREADS || !(s->avctx->active_thread_type&FF_THREAD_SLICE)) {
|
||||
if (context_init(h) < 0) {
|
||||
|
@ -428,10 +428,10 @@ static av_cold int X264_init(AVCodecContext *avctx)
|
||||
#define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM
|
||||
|
||||
static const AVOption options[] = {
|
||||
{"preset", "Set the encoding preset", OFFSET(preset), FF_OPT_TYPE_STRING, {.str=NULL}, 0, 0, VE},
|
||||
{"tune", "Tune the encoding params", OFFSET(tune), FF_OPT_TYPE_STRING, {.str=NULL}, 0, 0, VE},
|
||||
{"fastfirstpass", "Use fast settings when encoding first pass", OFFSET(fastfirstpass), FF_OPT_TYPE_INT, {.dbl=1}, 0, 1, VE},
|
||||
{"profile", "Set profile restrictions", OFFSET(profile), FF_OPT_TYPE_STRING, {.str=NULL}, 0, 0, VE},
|
||||
{ "preset", "Set the encoding preset (cf. x264 --fullhelp)", OFFSET(preset), FF_OPT_TYPE_STRING, { 0 }, 0, 0, VE},
|
||||
{ "tune", "Tune the encoding params (cf. x264 --fullhelp)", OFFSET(tune), FF_OPT_TYPE_STRING, { 0 }, 0, 0, VE},
|
||||
{ "profile", "Set profile restrictions (cf. x264 --fullhelp) ", OFFSET(profile), FF_OPT_TYPE_STRING, { 0 }, 0, 0, VE},
|
||||
{ "fastfirstpass", "Use fast settings when encoding first pass", OFFSET(fastfirstpass), FF_OPT_TYPE_INT, { 1 }, 0, 1, VE},
|
||||
{"level", "Specify level (as defined by Annex A)", OFFSET(level), FF_OPT_TYPE_STRING, {.str=NULL}, 0, 0, VE},
|
||||
{"passlogfile", "Filename for 2 pass stats", OFFSET(stats), FF_OPT_TYPE_STRING, {.str=NULL}, 0, 0, VE},
|
||||
{"wpredp", "Weighted prediction for P-frames", OFFSET(weightp), FF_OPT_TYPE_STRING, {.str=NULL}, 0, 0, VE},
|
||||
|
@ -81,7 +81,9 @@ read_header:
|
||||
{
|
||||
init_get_bits(&s->gb, buf_ptr+dqt_offs, (buf_end - (buf_ptr+dqt_offs))*8);
|
||||
s->start_code = DQT;
|
||||
ff_mjpeg_decode_dqt(s);
|
||||
if (ff_mjpeg_decode_dqt(s) < 0 &&
|
||||
avctx->error_recognition >= FF_ER_EXPLODE)
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
dht_offs = read_offs(avctx, &hgb, buf_end - buf_ptr, "dht is %d and size is %d\n");
|
||||
@ -113,7 +115,9 @@ read_header:
|
||||
init_get_bits(&s->gb, buf_ptr+sos_offs, field_size*8);
|
||||
s->mjpb_skiptosod = (sod_offs - sos_offs - show_bits(&s->gb, 16));
|
||||
s->start_code = SOS;
|
||||
ff_mjpeg_decode_sos(s, NULL, NULL);
|
||||
if (ff_mjpeg_decode_sos(s, NULL, NULL) < 0 &&
|
||||
avctx->error_recognition >= FF_ER_EXPLODE)
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
if (s->interlaced) {
|
||||
|
@ -1507,7 +1507,9 @@ eoi_parser:
|
||||
av_log(avctx, AV_LOG_WARNING, "Can not process SOS before SOF, skipping\n");
|
||||
break;
|
||||
}
|
||||
ff_mjpeg_decode_sos(s, NULL, NULL);
|
||||
if (ff_mjpeg_decode_sos(s, NULL, NULL) < 0 &&
|
||||
avctx->error_recognition >= FF_ER_EXPLODE)
|
||||
return AVERROR_INVALIDDATA;
|
||||
/* buggy avid puts EOI every 10-20th frame */
|
||||
/* if restart period is over process EOI */
|
||||
if ((s->buggy_avid && !s->interlaced) || s->restart_interval)
|
||||
|
@ -276,9 +276,13 @@ static int mxpeg_decode_frame(AVCodecContext *avctx,
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
|
||||
ff_mjpeg_decode_sos(jpg, s->mxm_bitmask, reference_ptr);
|
||||
ret = ff_mjpeg_decode_sos(jpg, s->mxm_bitmask, reference_ptr);
|
||||
if (ret < 0 && avctx->error_recognition >= FF_ER_EXPLODE)
|
||||
return ret;
|
||||
} else {
|
||||
ff_mjpeg_decode_sos(jpg, NULL, NULL);
|
||||
ret = ff_mjpeg_decode_sos(jpg, NULL, NULL);
|
||||
if (ret < 0 && avctx->error_recognition >= FF_ER_EXPLODE)
|
||||
return ret;
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -26,6 +26,7 @@
|
||||
|
||||
#include "avcodec.h"
|
||||
#include "dsputil.h"
|
||||
#include "rv34dsp.h"
|
||||
|
||||
#define RV30_LOWPASS(OPNAME, OP) \
|
||||
static av_unused void OPNAME ## rv30_tpel8_h_lowpass(uint8_t *dst, uint8_t *src, int dstStride, int srcStride, const int C1, const int C2){\
|
||||
@ -251,41 +252,46 @@ RV30_MC(put_, 16)
|
||||
RV30_MC(avg_, 8)
|
||||
RV30_MC(avg_, 16)
|
||||
|
||||
av_cold void ff_rv30dsp_init(DSPContext* c, AVCodecContext *avctx) {
|
||||
c->put_rv30_tpel_pixels_tab[0][ 0] = c->put_h264_qpel_pixels_tab[0][0];
|
||||
c->put_rv30_tpel_pixels_tab[0][ 1] = put_rv30_tpel16_mc10_c;
|
||||
c->put_rv30_tpel_pixels_tab[0][ 2] = put_rv30_tpel16_mc20_c;
|
||||
c->put_rv30_tpel_pixels_tab[0][ 4] = put_rv30_tpel16_mc01_c;
|
||||
c->put_rv30_tpel_pixels_tab[0][ 5] = put_rv30_tpel16_mc11_c;
|
||||
c->put_rv30_tpel_pixels_tab[0][ 6] = put_rv30_tpel16_mc21_c;
|
||||
c->put_rv30_tpel_pixels_tab[0][ 8] = put_rv30_tpel16_mc02_c;
|
||||
c->put_rv30_tpel_pixels_tab[0][ 9] = put_rv30_tpel16_mc12_c;
|
||||
c->put_rv30_tpel_pixels_tab[0][10] = put_rv30_tpel16_mc22_c;
|
||||
c->avg_rv30_tpel_pixels_tab[0][ 0] = c->avg_h264_qpel_pixels_tab[0][0];
|
||||
c->avg_rv30_tpel_pixels_tab[0][ 1] = avg_rv30_tpel16_mc10_c;
|
||||
c->avg_rv30_tpel_pixels_tab[0][ 2] = avg_rv30_tpel16_mc20_c;
|
||||
c->avg_rv30_tpel_pixels_tab[0][ 4] = avg_rv30_tpel16_mc01_c;
|
||||
c->avg_rv30_tpel_pixels_tab[0][ 5] = avg_rv30_tpel16_mc11_c;
|
||||
c->avg_rv30_tpel_pixels_tab[0][ 6] = avg_rv30_tpel16_mc21_c;
|
||||
c->avg_rv30_tpel_pixels_tab[0][ 8] = avg_rv30_tpel16_mc02_c;
|
||||
c->avg_rv30_tpel_pixels_tab[0][ 9] = avg_rv30_tpel16_mc12_c;
|
||||
c->avg_rv30_tpel_pixels_tab[0][10] = avg_rv30_tpel16_mc22_c;
|
||||
c->put_rv30_tpel_pixels_tab[1][ 0] = c->put_h264_qpel_pixels_tab[1][0];
|
||||
c->put_rv30_tpel_pixels_tab[1][ 1] = put_rv30_tpel8_mc10_c;
|
||||
c->put_rv30_tpel_pixels_tab[1][ 2] = put_rv30_tpel8_mc20_c;
|
||||
c->put_rv30_tpel_pixels_tab[1][ 4] = put_rv30_tpel8_mc01_c;
|
||||
c->put_rv30_tpel_pixels_tab[1][ 5] = put_rv30_tpel8_mc11_c;
|
||||
c->put_rv30_tpel_pixels_tab[1][ 6] = put_rv30_tpel8_mc21_c;
|
||||
c->put_rv30_tpel_pixels_tab[1][ 8] = put_rv30_tpel8_mc02_c;
|
||||
c->put_rv30_tpel_pixels_tab[1][ 9] = put_rv30_tpel8_mc12_c;
|
||||
c->put_rv30_tpel_pixels_tab[1][10] = put_rv30_tpel8_mc22_c;
|
||||
c->avg_rv30_tpel_pixels_tab[1][ 0] = c->avg_h264_qpel_pixels_tab[1][0];
|
||||
c->avg_rv30_tpel_pixels_tab[1][ 1] = avg_rv30_tpel8_mc10_c;
|
||||
c->avg_rv30_tpel_pixels_tab[1][ 2] = avg_rv30_tpel8_mc20_c;
|
||||
c->avg_rv30_tpel_pixels_tab[1][ 4] = avg_rv30_tpel8_mc01_c;
|
||||
c->avg_rv30_tpel_pixels_tab[1][ 5] = avg_rv30_tpel8_mc11_c;
|
||||
c->avg_rv30_tpel_pixels_tab[1][ 6] = avg_rv30_tpel8_mc21_c;
|
||||
c->avg_rv30_tpel_pixels_tab[1][ 8] = avg_rv30_tpel8_mc02_c;
|
||||
c->avg_rv30_tpel_pixels_tab[1][ 9] = avg_rv30_tpel8_mc12_c;
|
||||
c->avg_rv30_tpel_pixels_tab[1][10] = avg_rv30_tpel8_mc22_c;
|
||||
av_cold void ff_rv30dsp_init(RV34DSPContext *c, DSPContext* dsp) {
|
||||
c->put_pixels_tab[0][ 0] = dsp->put_h264_qpel_pixels_tab[0][0];
|
||||
c->put_pixels_tab[0][ 1] = put_rv30_tpel16_mc10_c;
|
||||
c->put_pixels_tab[0][ 2] = put_rv30_tpel16_mc20_c;
|
||||
c->put_pixels_tab[0][ 4] = put_rv30_tpel16_mc01_c;
|
||||
c->put_pixels_tab[0][ 5] = put_rv30_tpel16_mc11_c;
|
||||
c->put_pixels_tab[0][ 6] = put_rv30_tpel16_mc21_c;
|
||||
c->put_pixels_tab[0][ 8] = put_rv30_tpel16_mc02_c;
|
||||
c->put_pixels_tab[0][ 9] = put_rv30_tpel16_mc12_c;
|
||||
c->put_pixels_tab[0][10] = put_rv30_tpel16_mc22_c;
|
||||
c->avg_pixels_tab[0][ 0] = dsp->avg_h264_qpel_pixels_tab[0][0];
|
||||
c->avg_pixels_tab[0][ 1] = avg_rv30_tpel16_mc10_c;
|
||||
c->avg_pixels_tab[0][ 2] = avg_rv30_tpel16_mc20_c;
|
||||
c->avg_pixels_tab[0][ 4] = avg_rv30_tpel16_mc01_c;
|
||||
c->avg_pixels_tab[0][ 5] = avg_rv30_tpel16_mc11_c;
|
||||
c->avg_pixels_tab[0][ 6] = avg_rv30_tpel16_mc21_c;
|
||||
c->avg_pixels_tab[0][ 8] = avg_rv30_tpel16_mc02_c;
|
||||
c->avg_pixels_tab[0][ 9] = avg_rv30_tpel16_mc12_c;
|
||||
c->avg_pixels_tab[0][10] = avg_rv30_tpel16_mc22_c;
|
||||
c->put_pixels_tab[1][ 0] = dsp->put_h264_qpel_pixels_tab[1][0];
|
||||
c->put_pixels_tab[1][ 1] = put_rv30_tpel8_mc10_c;
|
||||
c->put_pixels_tab[1][ 2] = put_rv30_tpel8_mc20_c;
|
||||
c->put_pixels_tab[1][ 4] = put_rv30_tpel8_mc01_c;
|
||||
c->put_pixels_tab[1][ 5] = put_rv30_tpel8_mc11_c;
|
||||
c->put_pixels_tab[1][ 6] = put_rv30_tpel8_mc21_c;
|
||||
c->put_pixels_tab[1][ 8] = put_rv30_tpel8_mc02_c;
|
||||
c->put_pixels_tab[1][ 9] = put_rv30_tpel8_mc12_c;
|
||||
c->put_pixels_tab[1][10] = put_rv30_tpel8_mc22_c;
|
||||
c->avg_pixels_tab[1][ 0] = dsp->avg_h264_qpel_pixels_tab[1][0];
|
||||
c->avg_pixels_tab[1][ 1] = avg_rv30_tpel8_mc10_c;
|
||||
c->avg_pixels_tab[1][ 2] = avg_rv30_tpel8_mc20_c;
|
||||
c->avg_pixels_tab[1][ 4] = avg_rv30_tpel8_mc01_c;
|
||||
c->avg_pixels_tab[1][ 5] = avg_rv30_tpel8_mc11_c;
|
||||
c->avg_pixels_tab[1][ 6] = avg_rv30_tpel8_mc21_c;
|
||||
c->avg_pixels_tab[1][ 8] = avg_rv30_tpel8_mc02_c;
|
||||
c->avg_pixels_tab[1][ 9] = avg_rv30_tpel8_mc12_c;
|
||||
c->avg_pixels_tab[1][10] = avg_rv30_tpel8_mc22_c;
|
||||
|
||||
c->put_chroma_pixels_tab[0] = dsp->put_h264_chroma_pixels_tab[0];
|
||||
c->put_chroma_pixels_tab[1] = dsp->put_h264_chroma_pixels_tab[1];
|
||||
c->avg_chroma_pixels_tab[0] = dsp->avg_h264_chroma_pixels_tab[0];
|
||||
c->avg_chroma_pixels_tab[1] = dsp->avg_h264_chroma_pixels_tab[1];
|
||||
}
|
||||
|
@ -568,12 +568,8 @@ static void rv34_pred_mv(RV34DecContext *r, int block_type, int subblock_no, int
|
||||
*/
|
||||
static int calc_add_mv(RV34DecContext *r, int dir, int val)
|
||||
{
|
||||
int refdist = GET_PTS_DIFF(r->next_pts, r->last_pts);
|
||||
int dist = dir ? -GET_PTS_DIFF(r->next_pts, r->cur_pts) : GET_PTS_DIFF(r->cur_pts, r->last_pts);
|
||||
int mul;
|
||||
int mul = dir ? -r->weight2 : r->weight1;
|
||||
|
||||
if(!refdist) return 0;
|
||||
mul = (dist << 14) / refdist;
|
||||
return (val * mul + 0x2000) >> 14;
|
||||
}
|
||||
|
||||
@ -721,7 +717,7 @@ static const int chroma_coeffs[3] = { 0, 3, 5 };
|
||||
static inline void rv34_mc(RV34DecContext *r, const int block_type,
|
||||
const int xoff, const int yoff, int mv_off,
|
||||
const int width, const int height, int dir,
|
||||
const int thirdpel,
|
||||
const int thirdpel, int weighted,
|
||||
qpel_mc_func (*qpel_mc)[16],
|
||||
h264_chroma_mc_func (*chroma_mc))
|
||||
{
|
||||
@ -785,9 +781,15 @@ static inline void rv34_mc(RV34DecContext *r, const int block_type,
|
||||
srcU = uvbuf;
|
||||
srcV = uvbuf + 16;
|
||||
}
|
||||
Y = s->dest[0] + xoff + yoff *s->linesize;
|
||||
U = s->dest[1] + (xoff>>1) + (yoff>>1)*s->uvlinesize;
|
||||
V = s->dest[2] + (xoff>>1) + (yoff>>1)*s->uvlinesize;
|
||||
if(!weighted){
|
||||
Y = s->dest[0] + xoff + yoff *s->linesize;
|
||||
U = s->dest[1] + (xoff>>1) + (yoff>>1)*s->uvlinesize;
|
||||
V = s->dest[2] + (xoff>>1) + (yoff>>1)*s->uvlinesize;
|
||||
}else{
|
||||
Y = r->tmp_b_block_y [dir] + xoff + yoff *s->linesize;
|
||||
U = r->tmp_b_block_uv[dir*2] + (xoff>>1) + (yoff>>1)*s->uvlinesize;
|
||||
V = r->tmp_b_block_uv[dir*2+1] + (xoff>>1) + (yoff>>1)*s->uvlinesize;
|
||||
}
|
||||
|
||||
if(block_type == RV34_MB_P_16x8){
|
||||
qpel_mc[1][dxy](Y, srcY, s->linesize);
|
||||
@ -808,43 +810,70 @@ static void rv34_mc_1mv(RV34DecContext *r, const int block_type,
|
||||
const int xoff, const int yoff, int mv_off,
|
||||
const int width, const int height, int dir)
|
||||
{
|
||||
rv34_mc(r, block_type, xoff, yoff, mv_off, width, height, dir, r->rv30,
|
||||
r->rv30 ? r->s.dsp.put_rv30_tpel_pixels_tab
|
||||
: r->s.dsp.put_rv40_qpel_pixels_tab,
|
||||
r->rv30 ? r->s.dsp.put_h264_chroma_pixels_tab
|
||||
: r->s.dsp.put_rv40_chroma_pixels_tab);
|
||||
rv34_mc(r, block_type, xoff, yoff, mv_off, width, height, dir, r->rv30, 0,
|
||||
r->rdsp.put_pixels_tab,
|
||||
r->rdsp.put_chroma_pixels_tab);
|
||||
}
|
||||
|
||||
static void rv4_weight(RV34DecContext *r)
|
||||
{
|
||||
r->rdsp.rv40_weight_pixels_tab[0](r->s.dest[0],
|
||||
r->tmp_b_block_y[0],
|
||||
r->tmp_b_block_y[1],
|
||||
r->weight1,
|
||||
r->weight2,
|
||||
r->s.linesize);
|
||||
r->rdsp.rv40_weight_pixels_tab[1](r->s.dest[1],
|
||||
r->tmp_b_block_uv[0],
|
||||
r->tmp_b_block_uv[2],
|
||||
r->weight1,
|
||||
r->weight2,
|
||||
r->s.uvlinesize);
|
||||
r->rdsp.rv40_weight_pixels_tab[1](r->s.dest[2],
|
||||
r->tmp_b_block_uv[1],
|
||||
r->tmp_b_block_uv[3],
|
||||
r->weight1,
|
||||
r->weight2,
|
||||
r->s.uvlinesize);
|
||||
}
|
||||
|
||||
static void rv34_mc_2mv(RV34DecContext *r, const int block_type)
|
||||
{
|
||||
rv34_mc(r, block_type, 0, 0, 0, 2, 2, 0, r->rv30,
|
||||
r->rv30 ? r->s.dsp.put_rv30_tpel_pixels_tab
|
||||
: r->s.dsp.put_rv40_qpel_pixels_tab,
|
||||
r->rv30 ? r->s.dsp.put_h264_chroma_pixels_tab
|
||||
: r->s.dsp.put_rv40_chroma_pixels_tab);
|
||||
rv34_mc(r, block_type, 0, 0, 0, 2, 2, 1, r->rv30,
|
||||
r->rv30 ? r->s.dsp.avg_rv30_tpel_pixels_tab
|
||||
: r->s.dsp.avg_rv40_qpel_pixels_tab,
|
||||
r->rv30 ? r->s.dsp.avg_h264_chroma_pixels_tab
|
||||
: r->s.dsp.avg_rv40_chroma_pixels_tab);
|
||||
int weighted = !r->rv30 && block_type != RV34_MB_B_BIDIR && r->weight1 != 8192;
|
||||
|
||||
rv34_mc(r, block_type, 0, 0, 0, 2, 2, 0, r->rv30, weighted,
|
||||
r->rdsp.put_pixels_tab,
|
||||
r->rdsp.put_chroma_pixels_tab);
|
||||
if(!weighted){
|
||||
rv34_mc(r, block_type, 0, 0, 0, 2, 2, 1, r->rv30, 0,
|
||||
r->rdsp.avg_pixels_tab,
|
||||
r->rdsp.avg_chroma_pixels_tab);
|
||||
}else{
|
||||
rv34_mc(r, block_type, 0, 0, 0, 2, 2, 1, r->rv30, 1,
|
||||
r->rdsp.put_pixels_tab,
|
||||
r->rdsp.put_chroma_pixels_tab);
|
||||
rv4_weight(r);
|
||||
}
|
||||
}
|
||||
|
||||
static void rv34_mc_2mv_skip(RV34DecContext *r)
|
||||
{
|
||||
int i, j;
|
||||
int weighted = !r->rv30 && r->weight1 != 8192;
|
||||
|
||||
for(j = 0; j < 2; j++)
|
||||
for(i = 0; i < 2; i++){
|
||||
rv34_mc(r, RV34_MB_P_8x8, i*8, j*8, i+j*r->s.b8_stride, 1, 1, 0, r->rv30,
|
||||
r->rv30 ? r->s.dsp.put_rv30_tpel_pixels_tab
|
||||
: r->s.dsp.put_rv40_qpel_pixels_tab,
|
||||
r->rv30 ? r->s.dsp.put_h264_chroma_pixels_tab
|
||||
: r->s.dsp.put_rv40_chroma_pixels_tab);
|
||||
weighted,
|
||||
r->rdsp.put_pixels_tab,
|
||||
r->rdsp.put_chroma_pixels_tab);
|
||||
rv34_mc(r, RV34_MB_P_8x8, i*8, j*8, i+j*r->s.b8_stride, 1, 1, 1, r->rv30,
|
||||
r->rv30 ? r->s.dsp.avg_rv30_tpel_pixels_tab
|
||||
: r->s.dsp.avg_rv40_qpel_pixels_tab,
|
||||
r->rv30 ? r->s.dsp.avg_h264_chroma_pixels_tab
|
||||
: r->s.dsp.avg_rv40_chroma_pixels_tab);
|
||||
weighted,
|
||||
weighted ? r->rdsp.put_pixels_tab : r->rdsp.avg_pixels_tab,
|
||||
weighted ? r->rdsp.put_chroma_pixels_tab : r->rdsp.avg_chroma_pixels_tab);
|
||||
}
|
||||
if(weighted)
|
||||
rv4_weight(r);
|
||||
}
|
||||
|
||||
/** number of motion vectors in each macroblock type */
|
||||
@ -1279,10 +1308,31 @@ static int rv34_decode_slice(RV34DecContext *r, int end, const uint8_t* buf, int
|
||||
if(MPV_frame_start(s, s->avctx) < 0)
|
||||
return -1;
|
||||
ff_er_frame_start(s);
|
||||
if (!r->tmp_b_block_base || s->width != r->si.width || s->height != r->si.height) {
|
||||
int i;
|
||||
|
||||
r->tmp_b_block_base = av_realloc(r->tmp_b_block_base, s->linesize * 48);
|
||||
for (i = 0; i < 2; i++)
|
||||
r->tmp_b_block_y[i] = r->tmp_b_block_base + i * 16 * s->linesize;
|
||||
for (i = 0; i < 4; i++)
|
||||
r->tmp_b_block_uv[i] = r->tmp_b_block_base + 32 * s->linesize
|
||||
+ (i >> 1) * 8 * s->uvlinesize + (i & 1) * 16;
|
||||
}
|
||||
r->cur_pts = r->si.pts;
|
||||
if(s->pict_type != AV_PICTURE_TYPE_B){
|
||||
r->last_pts = r->next_pts;
|
||||
r->next_pts = r->cur_pts;
|
||||
}else{
|
||||
int refdist = GET_PTS_DIFF(r->next_pts, r->last_pts);
|
||||
int dist0 = GET_PTS_DIFF(r->cur_pts, r->last_pts);
|
||||
int dist1 = GET_PTS_DIFF(r->next_pts, r->cur_pts);
|
||||
|
||||
if(!refdist){
|
||||
r->weight1 = r->weight2 = 8192;
|
||||
}else{
|
||||
r->weight1 = (dist0 << 14) / refdist;
|
||||
r->weight2 = (dist1 << 14) / refdist;
|
||||
}
|
||||
}
|
||||
s->mb_x = s->mb_y = 0;
|
||||
}
|
||||
@ -1363,6 +1413,15 @@ av_cold int ff_rv34_decode_init(AVCodecContext *avctx)
|
||||
|
||||
ff_h264_pred_init(&r->h, CODEC_ID_RV40, 8);
|
||||
|
||||
#if CONFIG_RV30_DECODER
|
||||
if (avctx->codec_id == CODEC_ID_RV30)
|
||||
ff_rv30dsp_init(&r->rdsp, &r->s.dsp);
|
||||
#endif
|
||||
#if CONFIG_RV40_DECODER
|
||||
if (avctx->codec_id == CODEC_ID_RV40)
|
||||
ff_rv40dsp_init(&r->rdsp, &r->s.dsp);
|
||||
#endif
|
||||
|
||||
r->intra_types_stride = 4*s->mb_stride + 4;
|
||||
r->intra_types_hist = av_malloc(r->intra_types_stride * 4 * 2 * sizeof(*r->intra_types_hist));
|
||||
r->intra_types = r->intra_types_hist + r->intra_types_stride * 4;
|
||||
@ -1494,6 +1553,7 @@ av_cold int ff_rv34_decode_end(AVCodecContext *avctx)
|
||||
|
||||
av_freep(&r->intra_types_hist);
|
||||
r->intra_types = NULL;
|
||||
av_freep(&r->tmp_b_block_base);
|
||||
av_freep(&r->mb_type);
|
||||
av_freep(&r->cbp_luma);
|
||||
av_freep(&r->cbp_chroma);
|
||||
|
@ -32,6 +32,7 @@
|
||||
#include "mpegvideo.h"
|
||||
|
||||
#include "h264pred.h"
|
||||
#include "rv34dsp.h"
|
||||
|
||||
#define MB_TYPE_SEPARATE_DC 0x01000000
|
||||
#define IS_SEPARATE_DC(a) ((a) & MB_TYPE_SEPARATE_DC)
|
||||
@ -83,6 +84,7 @@ typedef struct SliceInfo{
|
||||
/** decoder context */
|
||||
typedef struct RV34DecContext{
|
||||
MpegEncContext s;
|
||||
RV34DSPContext rdsp;
|
||||
int8_t *intra_types_hist;///< old block types, used for prediction
|
||||
int8_t *intra_types; ///< block types
|
||||
int intra_types_stride;///< block types array stride
|
||||
@ -105,6 +107,7 @@ typedef struct RV34DecContext{
|
||||
int rpr; ///< one field size in RV30 slice header
|
||||
|
||||
int cur_pts, last_pts, next_pts;
|
||||
int weight1, weight2; ///< B frame distance fractions (0.14) used in motion compensation
|
||||
|
||||
uint16_t *cbp_luma; ///< CBP values for luma subblocks
|
||||
uint8_t *cbp_chroma; ///< CBP values for chroma subblocks
|
||||
@ -113,6 +116,11 @@ typedef struct RV34DecContext{
|
||||
/** 8x8 block available flags (for MV prediction) */
|
||||
DECLARE_ALIGNED(8, uint32_t, avail_cache)[3*4];
|
||||
|
||||
/** temporary blocks for RV4 weighted MC */
|
||||
uint8_t *tmp_b_block_y[2];
|
||||
uint8_t *tmp_b_block_uv[4];
|
||||
uint8_t *tmp_b_block_base;
|
||||
|
||||
int (*parse_slice_header)(struct RV34DecContext *r, GetBitContext *gb, SliceInfo *si);
|
||||
int (*decode_mb_info)(struct RV34DecContext *r);
|
||||
int (*decode_intra_types)(struct RV34DecContext *r, GetBitContext *gb, int8_t *dst);
|
||||
|
50
libavcodec/rv34dsp.h
Normal file
50
libavcodec/rv34dsp.h
Normal file
@ -0,0 +1,50 @@
|
||||
/*
|
||||
* RV30/40 decoder motion compensation functions
|
||||
* Copyright (c) 2008 Konstantin Shishkov
|
||||
*
|
||||
* This file is part of Libav.
|
||||
*
|
||||
* Libav is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* Libav is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with Libav; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file
|
||||
* RV30/40 decoder motion compensation functions
|
||||
*/
|
||||
|
||||
#ifndef AVCODEC_RV34DSP_H
|
||||
#define AVCODEC_RV34DSP_H
|
||||
|
||||
#include "dsputil.h"
|
||||
|
||||
typedef void (*rv40_weight_func)(uint8_t *dst/*align width (8 or 16)*/,
|
||||
uint8_t *src1/*align width (8 or 16)*/,
|
||||
uint8_t *src2/*align width (8 or 16)*/,
|
||||
int w1, int w2, int stride);
|
||||
|
||||
typedef struct RV34DSPContext {
|
||||
qpel_mc_func put_pixels_tab[4][16];
|
||||
qpel_mc_func avg_pixels_tab[4][16];
|
||||
h264_chroma_mc_func put_chroma_pixels_tab[3];
|
||||
h264_chroma_mc_func avg_chroma_pixels_tab[3];
|
||||
rv40_weight_func rv40_weight_pixels_tab[2];
|
||||
} RV34DSPContext;
|
||||
|
||||
void ff_rv30dsp_init(RV34DSPContext *c, DSPContext* dsp);
|
||||
void ff_rv40dsp_init(RV34DSPContext *c, DSPContext* dsp);
|
||||
|
||||
void ff_rv40dsp_init_x86(RV34DSPContext *c, DSPContext *dsp);
|
||||
|
||||
#endif /* AVCODEC_RV34DSP_H */
|
@ -26,6 +26,7 @@
|
||||
|
||||
#include "avcodec.h"
|
||||
#include "dsputil.h"
|
||||
#include "rv34dsp.h"
|
||||
|
||||
#define RV40_LOWPASS(OPNAME, OP) \
|
||||
static av_unused void OPNAME ## rv40_qpel8_h_lowpass(uint8_t *dst, uint8_t *src, int dstStride, int srcStride,\
|
||||
@ -284,70 +285,97 @@ static void OPNAME ## rv40_chroma_mc8_c(uint8_t *dst/*align 8*/, uint8_t *src/*a
|
||||
RV40_CHROMA_MC(put_, op_put)
|
||||
RV40_CHROMA_MC(avg_, op_avg)
|
||||
|
||||
void ff_rv40dsp_init(DSPContext* c, AVCodecContext *avctx) {
|
||||
c->put_rv40_qpel_pixels_tab[0][ 0] = c->put_h264_qpel_pixels_tab[0][0];
|
||||
c->put_rv40_qpel_pixels_tab[0][ 1] = put_rv40_qpel16_mc10_c;
|
||||
c->put_rv40_qpel_pixels_tab[0][ 2] = put_rv40_qpel16_mc20_c;
|
||||
c->put_rv40_qpel_pixels_tab[0][ 3] = put_rv40_qpel16_mc30_c;
|
||||
c->put_rv40_qpel_pixels_tab[0][ 4] = put_rv40_qpel16_mc01_c;
|
||||
c->put_rv40_qpel_pixels_tab[0][ 5] = put_rv40_qpel16_mc11_c;
|
||||
c->put_rv40_qpel_pixels_tab[0][ 6] = put_rv40_qpel16_mc21_c;
|
||||
c->put_rv40_qpel_pixels_tab[0][ 7] = put_rv40_qpel16_mc31_c;
|
||||
c->put_rv40_qpel_pixels_tab[0][ 8] = put_rv40_qpel16_mc02_c;
|
||||
c->put_rv40_qpel_pixels_tab[0][ 9] = put_rv40_qpel16_mc12_c;
|
||||
c->put_rv40_qpel_pixels_tab[0][10] = put_rv40_qpel16_mc22_c;
|
||||
c->put_rv40_qpel_pixels_tab[0][11] = put_rv40_qpel16_mc32_c;
|
||||
c->put_rv40_qpel_pixels_tab[0][12] = put_rv40_qpel16_mc03_c;
|
||||
c->put_rv40_qpel_pixels_tab[0][13] = put_rv40_qpel16_mc13_c;
|
||||
c->put_rv40_qpel_pixels_tab[0][14] = put_rv40_qpel16_mc23_c;
|
||||
c->avg_rv40_qpel_pixels_tab[0][ 0] = c->avg_h264_qpel_pixels_tab[0][0];
|
||||
c->avg_rv40_qpel_pixels_tab[0][ 1] = avg_rv40_qpel16_mc10_c;
|
||||
c->avg_rv40_qpel_pixels_tab[0][ 2] = avg_rv40_qpel16_mc20_c;
|
||||
c->avg_rv40_qpel_pixels_tab[0][ 3] = avg_rv40_qpel16_mc30_c;
|
||||
c->avg_rv40_qpel_pixels_tab[0][ 4] = avg_rv40_qpel16_mc01_c;
|
||||
c->avg_rv40_qpel_pixels_tab[0][ 5] = avg_rv40_qpel16_mc11_c;
|
||||
c->avg_rv40_qpel_pixels_tab[0][ 6] = avg_rv40_qpel16_mc21_c;
|
||||
c->avg_rv40_qpel_pixels_tab[0][ 7] = avg_rv40_qpel16_mc31_c;
|
||||
c->avg_rv40_qpel_pixels_tab[0][ 8] = avg_rv40_qpel16_mc02_c;
|
||||
c->avg_rv40_qpel_pixels_tab[0][ 9] = avg_rv40_qpel16_mc12_c;
|
||||
c->avg_rv40_qpel_pixels_tab[0][10] = avg_rv40_qpel16_mc22_c;
|
||||
c->avg_rv40_qpel_pixels_tab[0][11] = avg_rv40_qpel16_mc32_c;
|
||||
c->avg_rv40_qpel_pixels_tab[0][12] = avg_rv40_qpel16_mc03_c;
|
||||
c->avg_rv40_qpel_pixels_tab[0][13] = avg_rv40_qpel16_mc13_c;
|
||||
c->avg_rv40_qpel_pixels_tab[0][14] = avg_rv40_qpel16_mc23_c;
|
||||
c->put_rv40_qpel_pixels_tab[1][ 0] = c->put_h264_qpel_pixels_tab[1][0];
|
||||
c->put_rv40_qpel_pixels_tab[1][ 1] = put_rv40_qpel8_mc10_c;
|
||||
c->put_rv40_qpel_pixels_tab[1][ 2] = put_rv40_qpel8_mc20_c;
|
||||
c->put_rv40_qpel_pixels_tab[1][ 3] = put_rv40_qpel8_mc30_c;
|
||||
c->put_rv40_qpel_pixels_tab[1][ 4] = put_rv40_qpel8_mc01_c;
|
||||
c->put_rv40_qpel_pixels_tab[1][ 5] = put_rv40_qpel8_mc11_c;
|
||||
c->put_rv40_qpel_pixels_tab[1][ 6] = put_rv40_qpel8_mc21_c;
|
||||
c->put_rv40_qpel_pixels_tab[1][ 7] = put_rv40_qpel8_mc31_c;
|
||||
c->put_rv40_qpel_pixels_tab[1][ 8] = put_rv40_qpel8_mc02_c;
|
||||
c->put_rv40_qpel_pixels_tab[1][ 9] = put_rv40_qpel8_mc12_c;
|
||||
c->put_rv40_qpel_pixels_tab[1][10] = put_rv40_qpel8_mc22_c;
|
||||
c->put_rv40_qpel_pixels_tab[1][11] = put_rv40_qpel8_mc32_c;
|
||||
c->put_rv40_qpel_pixels_tab[1][12] = put_rv40_qpel8_mc03_c;
|
||||
c->put_rv40_qpel_pixels_tab[1][13] = put_rv40_qpel8_mc13_c;
|
||||
c->put_rv40_qpel_pixels_tab[1][14] = put_rv40_qpel8_mc23_c;
|
||||
c->avg_rv40_qpel_pixels_tab[1][ 0] = c->avg_h264_qpel_pixels_tab[1][0];
|
||||
c->avg_rv40_qpel_pixels_tab[1][ 1] = avg_rv40_qpel8_mc10_c;
|
||||
c->avg_rv40_qpel_pixels_tab[1][ 2] = avg_rv40_qpel8_mc20_c;
|
||||
c->avg_rv40_qpel_pixels_tab[1][ 3] = avg_rv40_qpel8_mc30_c;
|
||||
c->avg_rv40_qpel_pixels_tab[1][ 4] = avg_rv40_qpel8_mc01_c;
|
||||
c->avg_rv40_qpel_pixels_tab[1][ 5] = avg_rv40_qpel8_mc11_c;
|
||||
c->avg_rv40_qpel_pixels_tab[1][ 6] = avg_rv40_qpel8_mc21_c;
|
||||
c->avg_rv40_qpel_pixels_tab[1][ 7] = avg_rv40_qpel8_mc31_c;
|
||||
c->avg_rv40_qpel_pixels_tab[1][ 8] = avg_rv40_qpel8_mc02_c;
|
||||
c->avg_rv40_qpel_pixels_tab[1][ 9] = avg_rv40_qpel8_mc12_c;
|
||||
c->avg_rv40_qpel_pixels_tab[1][10] = avg_rv40_qpel8_mc22_c;
|
||||
c->avg_rv40_qpel_pixels_tab[1][11] = avg_rv40_qpel8_mc32_c;
|
||||
c->avg_rv40_qpel_pixels_tab[1][12] = avg_rv40_qpel8_mc03_c;
|
||||
c->avg_rv40_qpel_pixels_tab[1][13] = avg_rv40_qpel8_mc13_c;
|
||||
c->avg_rv40_qpel_pixels_tab[1][14] = avg_rv40_qpel8_mc23_c;
|
||||
|
||||
c->put_rv40_chroma_pixels_tab[0] = put_rv40_chroma_mc8_c;
|
||||
c->put_rv40_chroma_pixels_tab[1] = put_rv40_chroma_mc4_c;
|
||||
c->avg_rv40_chroma_pixels_tab[0] = avg_rv40_chroma_mc8_c;
|
||||
c->avg_rv40_chroma_pixels_tab[1] = avg_rv40_chroma_mc4_c;
|
||||
#define RV40_WEIGHT_FUNC(size) \
|
||||
static void rv40_weight_func_ ## size (uint8_t *dst, uint8_t *src1, uint8_t *src2, int w1, int w2, int stride)\
|
||||
{\
|
||||
int i, j;\
|
||||
\
|
||||
for (j = 0; j < size; j++) {\
|
||||
for (i = 0; i < size; i++)\
|
||||
dst[i] = (((w2 * src1[i]) >> 9) + ((w1 * src2[i]) >> 9) + 0x10) >> 5;\
|
||||
src1 += stride;\
|
||||
src2 += stride;\
|
||||
dst += stride;\
|
||||
}\
|
||||
}
|
||||
|
||||
RV40_WEIGHT_FUNC(16)
|
||||
RV40_WEIGHT_FUNC(8)
|
||||
|
||||
av_cold void ff_rv40dsp_init(RV34DSPContext *c, DSPContext* dsp) {
|
||||
c->put_pixels_tab[0][ 0] = dsp->put_h264_qpel_pixels_tab[0][0];
|
||||
c->put_pixels_tab[0][ 1] = put_rv40_qpel16_mc10_c;
|
||||
c->put_pixels_tab[0][ 2] = put_rv40_qpel16_mc20_c;
|
||||
c->put_pixels_tab[0][ 3] = put_rv40_qpel16_mc30_c;
|
||||
c->put_pixels_tab[0][ 4] = put_rv40_qpel16_mc01_c;
|
||||
c->put_pixels_tab[0][ 5] = put_rv40_qpel16_mc11_c;
|
||||
c->put_pixels_tab[0][ 6] = put_rv40_qpel16_mc21_c;
|
||||
c->put_pixels_tab[0][ 7] = put_rv40_qpel16_mc31_c;
|
||||
c->put_pixels_tab[0][ 8] = put_rv40_qpel16_mc02_c;
|
||||
c->put_pixels_tab[0][ 9] = put_rv40_qpel16_mc12_c;
|
||||
c->put_pixels_tab[0][10] = put_rv40_qpel16_mc22_c;
|
||||
c->put_pixels_tab[0][11] = put_rv40_qpel16_mc32_c;
|
||||
c->put_pixels_tab[0][12] = put_rv40_qpel16_mc03_c;
|
||||
c->put_pixels_tab[0][13] = put_rv40_qpel16_mc13_c;
|
||||
c->put_pixels_tab[0][14] = put_rv40_qpel16_mc23_c;
|
||||
c->put_pixels_tab[0][15] = ff_put_rv40_qpel16_mc33_c;
|
||||
c->avg_pixels_tab[0][ 0] = dsp->avg_h264_qpel_pixels_tab[0][0];
|
||||
c->avg_pixels_tab[0][ 1] = avg_rv40_qpel16_mc10_c;
|
||||
c->avg_pixels_tab[0][ 2] = avg_rv40_qpel16_mc20_c;
|
||||
c->avg_pixels_tab[0][ 3] = avg_rv40_qpel16_mc30_c;
|
||||
c->avg_pixels_tab[0][ 4] = avg_rv40_qpel16_mc01_c;
|
||||
c->avg_pixels_tab[0][ 5] = avg_rv40_qpel16_mc11_c;
|
||||
c->avg_pixels_tab[0][ 6] = avg_rv40_qpel16_mc21_c;
|
||||
c->avg_pixels_tab[0][ 7] = avg_rv40_qpel16_mc31_c;
|
||||
c->avg_pixels_tab[0][ 8] = avg_rv40_qpel16_mc02_c;
|
||||
c->avg_pixels_tab[0][ 9] = avg_rv40_qpel16_mc12_c;
|
||||
c->avg_pixels_tab[0][10] = avg_rv40_qpel16_mc22_c;
|
||||
c->avg_pixels_tab[0][11] = avg_rv40_qpel16_mc32_c;
|
||||
c->avg_pixels_tab[0][12] = avg_rv40_qpel16_mc03_c;
|
||||
c->avg_pixels_tab[0][13] = avg_rv40_qpel16_mc13_c;
|
||||
c->avg_pixels_tab[0][14] = avg_rv40_qpel16_mc23_c;
|
||||
c->avg_pixels_tab[0][15] = ff_avg_rv40_qpel16_mc33_c;
|
||||
c->put_pixels_tab[1][ 0] = dsp->put_h264_qpel_pixels_tab[1][0];
|
||||
c->put_pixels_tab[1][ 1] = put_rv40_qpel8_mc10_c;
|
||||
c->put_pixels_tab[1][ 2] = put_rv40_qpel8_mc20_c;
|
||||
c->put_pixels_tab[1][ 3] = put_rv40_qpel8_mc30_c;
|
||||
c->put_pixels_tab[1][ 4] = put_rv40_qpel8_mc01_c;
|
||||
c->put_pixels_tab[1][ 5] = put_rv40_qpel8_mc11_c;
|
||||
c->put_pixels_tab[1][ 6] = put_rv40_qpel8_mc21_c;
|
||||
c->put_pixels_tab[1][ 7] = put_rv40_qpel8_mc31_c;
|
||||
c->put_pixels_tab[1][ 8] = put_rv40_qpel8_mc02_c;
|
||||
c->put_pixels_tab[1][ 9] = put_rv40_qpel8_mc12_c;
|
||||
c->put_pixels_tab[1][10] = put_rv40_qpel8_mc22_c;
|
||||
c->put_pixels_tab[1][11] = put_rv40_qpel8_mc32_c;
|
||||
c->put_pixels_tab[1][12] = put_rv40_qpel8_mc03_c;
|
||||
c->put_pixels_tab[1][13] = put_rv40_qpel8_mc13_c;
|
||||
c->put_pixels_tab[1][14] = put_rv40_qpel8_mc23_c;
|
||||
c->put_pixels_tab[1][15] = ff_put_rv40_qpel8_mc33_c;
|
||||
c->avg_pixels_tab[1][ 0] = dsp->avg_h264_qpel_pixels_tab[1][0];
|
||||
c->avg_pixels_tab[1][ 1] = avg_rv40_qpel8_mc10_c;
|
||||
c->avg_pixels_tab[1][ 2] = avg_rv40_qpel8_mc20_c;
|
||||
c->avg_pixels_tab[1][ 3] = avg_rv40_qpel8_mc30_c;
|
||||
c->avg_pixels_tab[1][ 4] = avg_rv40_qpel8_mc01_c;
|
||||
c->avg_pixels_tab[1][ 5] = avg_rv40_qpel8_mc11_c;
|
||||
c->avg_pixels_tab[1][ 6] = avg_rv40_qpel8_mc21_c;
|
||||
c->avg_pixels_tab[1][ 7] = avg_rv40_qpel8_mc31_c;
|
||||
c->avg_pixels_tab[1][ 8] = avg_rv40_qpel8_mc02_c;
|
||||
c->avg_pixels_tab[1][ 9] = avg_rv40_qpel8_mc12_c;
|
||||
c->avg_pixels_tab[1][10] = avg_rv40_qpel8_mc22_c;
|
||||
c->avg_pixels_tab[1][11] = avg_rv40_qpel8_mc32_c;
|
||||
c->avg_pixels_tab[1][12] = avg_rv40_qpel8_mc03_c;
|
||||
c->avg_pixels_tab[1][13] = avg_rv40_qpel8_mc13_c;
|
||||
c->avg_pixels_tab[1][14] = avg_rv40_qpel8_mc23_c;
|
||||
c->avg_pixels_tab[1][15] = ff_avg_rv40_qpel8_mc33_c;
|
||||
|
||||
c->put_chroma_pixels_tab[0] = put_rv40_chroma_mc8_c;
|
||||
c->put_chroma_pixels_tab[1] = put_rv40_chroma_mc4_c;
|
||||
c->avg_chroma_pixels_tab[0] = avg_rv40_chroma_mc8_c;
|
||||
c->avg_chroma_pixels_tab[1] = avg_rv40_chroma_mc4_c;
|
||||
|
||||
c->rv40_weight_pixels_tab[0] = rv40_weight_func_16;
|
||||
c->rv40_weight_pixels_tab[1] = rv40_weight_func_8;
|
||||
|
||||
if (HAVE_MMX)
|
||||
ff_rv40dsp_init_x86(c, dsp);
|
||||
}
|
||||
|
@ -21,6 +21,8 @@ YASM-OBJS-$(CONFIG_H264PRED) += x86/h264_intrapred.o \
|
||||
x86/h264_intrapred_10bit.o
|
||||
MMX-OBJS-$(CONFIG_H264PRED) += x86/h264_intrapred_init.o
|
||||
|
||||
MMX-OBJS-$(CONFIG_RV40_DECODER) += x86/rv40dsp.o \
|
||||
|
||||
YASM-OBJS-$(CONFIG_VC1_DECODER) += x86/vc1dsp_yasm.o
|
||||
|
||||
MMX-OBJS-$(CONFIG_AC3DSP) += x86/ac3dsp_mmx.o
|
||||
|
@ -19,8 +19,8 @@
|
||||
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
;******************************************************************************
|
||||
|
||||
%include "x86inc.asm"
|
||||
%include "x86util.asm"
|
||||
%include "libavutil/x86/x86inc.asm"
|
||||
%include "libavutil/x86/x86util.asm"
|
||||
|
||||
SECTION_RODATA
|
||||
|
||||
|
@ -19,8 +19,8 @@
|
||||
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
;******************************************************************************
|
||||
|
||||
%include "x86inc.asm"
|
||||
%include "x86util.asm"
|
||||
%include "libavutil/x86/x86inc.asm"
|
||||
%include "libavutil/x86/x86util.asm"
|
||||
|
||||
SECTION_RODATA 32
|
||||
|
||||
|
@ -20,8 +20,8 @@
|
||||
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
;******************************************************************************
|
||||
|
||||
%include "x86inc.asm"
|
||||
%include "x86util.asm"
|
||||
%include "libavutil/x86/x86inc.asm"
|
||||
%include "libavutil/x86/x86util.asm"
|
||||
|
||||
SECTION_RODATA
|
||||
|
||||
|
@ -1799,29 +1799,17 @@ PREFETCH(prefetch_3dnow, prefetch)
|
||||
|
||||
void ff_put_h264_chroma_mc8_mmx_rnd (uint8_t *dst, uint8_t *src,
|
||||
int stride, int h, int x, int y);
|
||||
void ff_put_rv40_chroma_mc8_mmx (uint8_t *dst, uint8_t *src,
|
||||
int stride, int h, int x, int y);
|
||||
void ff_avg_h264_chroma_mc8_mmx2_rnd (uint8_t *dst, uint8_t *src,
|
||||
int stride, int h, int x, int y);
|
||||
void ff_avg_rv40_chroma_mc8_mmx2 (uint8_t *dst, uint8_t *src,
|
||||
int stride, int h, int x, int y);
|
||||
void ff_avg_h264_chroma_mc8_3dnow_rnd (uint8_t *dst, uint8_t *src,
|
||||
int stride, int h, int x, int y);
|
||||
void ff_avg_rv40_chroma_mc8_3dnow (uint8_t *dst, uint8_t *src,
|
||||
int stride, int h, int x, int y);
|
||||
|
||||
void ff_put_h264_chroma_mc4_mmx (uint8_t *dst, uint8_t *src,
|
||||
int stride, int h, int x, int y);
|
||||
void ff_put_rv40_chroma_mc4_mmx (uint8_t *dst, uint8_t *src,
|
||||
int stride, int h, int x, int y);
|
||||
void ff_avg_h264_chroma_mc4_mmx2 (uint8_t *dst, uint8_t *src,
|
||||
int stride, int h, int x, int y);
|
||||
void ff_avg_rv40_chroma_mc4_mmx2 (uint8_t *dst, uint8_t *src,
|
||||
int stride, int h, int x, int y);
|
||||
void ff_avg_h264_chroma_mc4_3dnow (uint8_t *dst, uint8_t *src,
|
||||
int stride, int h, int x, int y);
|
||||
void ff_avg_rv40_chroma_mc4_3dnow (uint8_t *dst, uint8_t *src,
|
||||
int stride, int h, int x, int y);
|
||||
|
||||
void ff_put_h264_chroma_mc2_mmx2 (uint8_t *dst, uint8_t *src,
|
||||
int stride, int h, int x, int y);
|
||||
@ -2476,9 +2464,6 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx)
|
||||
c->put_h264_chroma_pixels_tab[1]= ff_put_h264_chroma_mc4_mmx;
|
||||
}
|
||||
|
||||
c->put_rv40_chroma_pixels_tab[0]= ff_put_rv40_chroma_mc8_mmx;
|
||||
c->put_rv40_chroma_pixels_tab[1]= ff_put_rv40_chroma_mc4_mmx;
|
||||
|
||||
c->vector_clip_int32 = ff_vector_clip_int32_mmx;
|
||||
#endif
|
||||
|
||||
@ -2578,9 +2563,6 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx)
|
||||
SET_QPEL_FUNCS(avg_2tap_qpel, 1, 8, mmx2, );
|
||||
|
||||
#if HAVE_YASM
|
||||
c->avg_rv40_chroma_pixels_tab[0]= ff_avg_rv40_chroma_mc8_mmx2;
|
||||
c->avg_rv40_chroma_pixels_tab[1]= ff_avg_rv40_chroma_mc4_mmx2;
|
||||
|
||||
if (!high_bit_depth) {
|
||||
c->avg_h264_chroma_pixels_tab[0]= ff_avg_h264_chroma_mc8_mmx2_rnd;
|
||||
c->avg_h264_chroma_pixels_tab[1]= ff_avg_h264_chroma_mc4_mmx2;
|
||||
@ -2662,8 +2644,6 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx)
|
||||
c->avg_h264_chroma_pixels_tab[1]= ff_avg_h264_chroma_mc4_3dnow;
|
||||
}
|
||||
|
||||
c->avg_rv40_chroma_pixels_tab[0]= ff_avg_rv40_chroma_mc8_3dnow;
|
||||
c->avg_rv40_chroma_pixels_tab[1]= ff_avg_rv40_chroma_mc4_3dnow;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
;******************************************************************************
|
||||
|
||||
%include "x86inc.asm"
|
||||
%include "libavutil/x86/x86inc.asm"
|
||||
|
||||
SECTION_RODATA
|
||||
pb_f: times 16 db 15
|
||||
|
@ -21,8 +21,8 @@
|
||||
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
;*****************************************************************************
|
||||
|
||||
%include "x86inc.asm"
|
||||
%include "x86util.asm"
|
||||
%include "libavutil/x86/x86inc.asm"
|
||||
%include "libavutil/x86/x86util.asm"
|
||||
|
||||
SECTION .text
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
||||
; in blocks as conventient to the vector size.
|
||||
; i.e. {4x real, 4x imaginary, 4x real, ...} (or 2x respectively)
|
||||
|
||||
%include "x86inc.asm"
|
||||
%include "libavutil/x86/x86inc.asm"
|
||||
|
||||
%ifdef ARCH_X86_64
|
||||
%define pointer resq
|
||||
|
@ -19,8 +19,8 @@
|
||||
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
;******************************************************************************
|
||||
|
||||
%include "x86inc.asm"
|
||||
%include "x86util.asm"
|
||||
%include "libavutil/x86/x86inc.asm"
|
||||
%include "libavutil/x86/x86util.asm"
|
||||
|
||||
SECTION_TEXT
|
||||
|
||||
|
@ -20,8 +20,8 @@
|
||||
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
;******************************************************************************
|
||||
|
||||
%include "x86inc.asm"
|
||||
%include "x86util.asm"
|
||||
%include "libavutil/x86/x86inc.asm"
|
||||
%include "libavutil/x86/x86util.asm"
|
||||
|
||||
SECTION_RODATA
|
||||
|
||||
|
@ -22,8 +22,8 @@
|
||||
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
;******************************************************************************
|
||||
|
||||
%include "x86inc.asm"
|
||||
%include "x86util.asm"
|
||||
%include "libavutil/x86/x86inc.asm"
|
||||
%include "libavutil/x86/x86util.asm"
|
||||
|
||||
SECTION_RODATA
|
||||
|
||||
|
@ -24,8 +24,8 @@
|
||||
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
;******************************************************************************
|
||||
|
||||
%include "x86inc.asm"
|
||||
%include "x86util.asm"
|
||||
%include "libavutil/x86/x86inc.asm"
|
||||
%include "libavutil/x86/x86util.asm"
|
||||
|
||||
SECTION .text
|
||||
|
||||
|
@ -24,8 +24,8 @@
|
||||
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
;******************************************************************************
|
||||
|
||||
%include "x86inc.asm"
|
||||
%include "x86util.asm"
|
||||
%include "libavutil/x86/x86inc.asm"
|
||||
%include "libavutil/x86/x86util.asm"
|
||||
|
||||
SECTION_RODATA
|
||||
|
||||
|
@ -26,8 +26,8 @@
|
||||
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
;*****************************************************************************
|
||||
|
||||
%include "x86inc.asm"
|
||||
%include "x86util.asm"
|
||||
%include "libavutil/x86/x86inc.asm"
|
||||
%include "libavutil/x86/x86util.asm"
|
||||
|
||||
SECTION_RODATA
|
||||
|
||||
|
@ -22,8 +22,8 @@
|
||||
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
;******************************************************************************
|
||||
|
||||
%include "x86inc.asm"
|
||||
%include "x86util.asm"
|
||||
%include "libavutil/x86/x86inc.asm"
|
||||
%include "libavutil/x86/x86util.asm"
|
||||
|
||||
SECTION_RODATA
|
||||
|
||||
|
@ -22,8 +22,8 @@
|
||||
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
;******************************************************************************
|
||||
|
||||
%include "x86inc.asm"
|
||||
%include "x86util.asm"
|
||||
%include "libavutil/x86/x86inc.asm"
|
||||
%include "libavutil/x86/x86util.asm"
|
||||
|
||||
SECTION_RODATA
|
||||
|
||||
|
@ -22,8 +22,8 @@
|
||||
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
;******************************************************************************
|
||||
|
||||
%include "x86inc.asm"
|
||||
%include "x86util.asm"
|
||||
%include "libavutil/x86/x86inc.asm"
|
||||
%include "libavutil/x86/x86util.asm"
|
||||
|
||||
SECTION_RODATA
|
||||
|
||||
|
@ -22,8 +22,8 @@
|
||||
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
;******************************************************************************
|
||||
|
||||
%include "x86inc.asm"
|
||||
%include "x86util.asm"
|
||||
%include "libavutil/x86/x86inc.asm"
|
||||
%include "libavutil/x86/x86util.asm"
|
||||
|
||||
SECTION_RODATA 32
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
;******************************************************************************
|
||||
|
||||
%include "x86inc.asm"
|
||||
%include "libavutil/x86/x86inc.asm"
|
||||
|
||||
SECTION .text
|
||||
|
||||
|
@ -22,8 +22,8 @@
|
||||
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
;******************************************************************************
|
||||
|
||||
%include "x86inc.asm"
|
||||
%include "x86util.asm"
|
||||
%include "libavutil/x86/x86inc.asm"
|
||||
%include "libavutil/x86/x86util.asm"
|
||||
|
||||
SECTION_RODATA 32
|
||||
|
||||
|
60
libavcodec/x86/rv40dsp.c
Normal file
60
libavcodec/x86/rv40dsp.c
Normal file
@ -0,0 +1,60 @@
|
||||
/*
|
||||
* RV40 decoder motion compensation functions x86-optimised
|
||||
* Copyright (c) 2008 Konstantin Shishkov
|
||||
*
|
||||
* This file is part of Libav.
|
||||
*
|
||||
* Libav is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* Libav is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with Libav; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file
|
||||
* RV40 decoder motion compensation functions x86-optimised
|
||||
*/
|
||||
|
||||
#include "libavcodec/rv34dsp.h"
|
||||
|
||||
void ff_put_rv40_chroma_mc8_mmx (uint8_t *dst, uint8_t *src,
|
||||
int stride, int h, int x, int y);
|
||||
void ff_avg_rv40_chroma_mc8_mmx2 (uint8_t *dst, uint8_t *src,
|
||||
int stride, int h, int x, int y);
|
||||
void ff_avg_rv40_chroma_mc8_3dnow(uint8_t *dst, uint8_t *src,
|
||||
int stride, int h, int x, int y);
|
||||
|
||||
void ff_put_rv40_chroma_mc4_mmx (uint8_t *dst, uint8_t *src,
|
||||
int stride, int h, int x, int y);
|
||||
void ff_avg_rv40_chroma_mc4_mmx2 (uint8_t *dst, uint8_t *src,
|
||||
int stride, int h, int x, int y);
|
||||
void ff_avg_rv40_chroma_mc4_3dnow(uint8_t *dst, uint8_t *src,
|
||||
int stride, int h, int x, int y);
|
||||
|
||||
void ff_rv40dsp_init_x86(RV34DSPContext *c, DSPContext *dsp)
|
||||
{
|
||||
av_unused int mm_flags = av_get_cpu_flags();
|
||||
|
||||
#if HAVE_YASM
|
||||
if (mm_flags & AV_CPU_FLAG_MMX) {
|
||||
c->put_chroma_pixels_tab[0] = ff_put_rv40_chroma_mc8_mmx;
|
||||
c->put_chroma_pixels_tab[1] = ff_put_rv40_chroma_mc4_mmx;
|
||||
}
|
||||
if (mm_flags & AV_CPU_FLAG_MMX2) {
|
||||
c->avg_chroma_pixels_tab[0] = ff_avg_rv40_chroma_mc8_mmx2;
|
||||
c->avg_chroma_pixels_tab[1] = ff_avg_rv40_chroma_mc4_mmx2;
|
||||
} else if (mm_flags & AV_CPU_FLAG_3DNOW) {
|
||||
c->avg_chroma_pixels_tab[0] = ff_avg_rv40_chroma_mc8_3dnow;
|
||||
c->avg_chroma_pixels_tab[1] = ff_avg_rv40_chroma_mc4_3dnow;
|
||||
}
|
||||
#endif
|
||||
}
|
@ -19,8 +19,8 @@
|
||||
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
;******************************************************************************
|
||||
|
||||
%include "x86inc.asm"
|
||||
%include "x86util.asm"
|
||||
%include "libavutil/x86/x86inc.asm"
|
||||
%include "libavutil/x86/x86util.asm"
|
||||
|
||||
cextern pw_4
|
||||
cextern pw_5
|
||||
|
@ -19,8 +19,8 @@
|
||||
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
;******************************************************************************
|
||||
|
||||
%include "x86inc.asm"
|
||||
%include "x86util.asm"
|
||||
%include "libavutil/x86/x86inc.asm"
|
||||
%include "libavutil/x86/x86util.asm"
|
||||
|
||||
; MMX-optimized functions cribbed from the original VP3 source code.
|
||||
|
||||
|
@ -20,8 +20,8 @@
|
||||
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
;******************************************************************************
|
||||
|
||||
%include "x86inc.asm"
|
||||
%include "x86util.asm"
|
||||
%include "libavutil/x86/x86inc.asm"
|
||||
%include "libavutil/x86/x86util.asm"
|
||||
|
||||
cextern pw_64
|
||||
|
||||
|
@ -20,8 +20,8 @@
|
||||
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
;******************************************************************************
|
||||
|
||||
%include "x86inc.asm"
|
||||
%include "x86util.asm"
|
||||
%include "libavutil/x86/x86inc.asm"
|
||||
%include "libavutil/x86/x86util.asm"
|
||||
|
||||
SECTION_RODATA
|
||||
|
||||
|
@ -883,6 +883,14 @@ typedef struct AVFormatContext {
|
||||
*/
|
||||
int fps_probe_size;
|
||||
|
||||
/**
|
||||
* Error recognition; higher values will detect more errors but may
|
||||
* misdetect some more or less valid parts as errors.
|
||||
* - encoding: unused
|
||||
* - decoding: Set by user.
|
||||
*/
|
||||
int error_recognition;
|
||||
|
||||
/**
|
||||
* Transport stream id.
|
||||
* This will be moved into demuxer private options. Thus no API/ABI compatibility
|
||||
|
@ -690,9 +690,9 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap)
|
||||
break;
|
||||
case MKTAG('i', 'n', 'd', 'x'):
|
||||
i= avio_tell(pb);
|
||||
if(pb->seekable && !(s->flags & AVFMT_FLAG_IGNIDX) && avi->use_odml){
|
||||
read_braindead_odml_indx(s, 0);
|
||||
}
|
||||
if(pb->seekable && !(s->flags & AVFMT_FLAG_IGNIDX) && avi->use_odml &&
|
||||
read_braindead_odml_indx(s, 0) < 0 && s->error_recognition >= FF_ER_EXPLODE){
|
||||
goto fail; }
|
||||
avio_seek(pb, i+size, SEEK_SET);
|
||||
break;
|
||||
case MKTAG('v', 'p', 'r', 'p'):
|
||||
@ -729,6 +729,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap)
|
||||
if(size > 1000000){
|
||||
av_log(s, AV_LOG_ERROR, "Something went wrong during header parsing, "
|
||||
"I will ignore it and try to continue anyway.\n");
|
||||
if (s->error_recognition >= FF_ER_EXPLODE) goto fail;
|
||||
avi->movi_list = avio_tell(pb) - 4;
|
||||
avi->movi_end = avio_size(pb);
|
||||
goto end_of_header;
|
||||
|
@ -90,6 +90,9 @@ static const AVOption options[]={
|
||||
{"fdebug", "print specific debug info", OFFSET(debug), FF_OPT_TYPE_FLAGS, {.dbl = DEFAULT }, 0, INT_MAX, E|D, "fdebug"},
|
||||
{"ts", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_FDEBUG_TS }, INT_MIN, INT_MAX, E|D, "fdebug"},
|
||||
{"max_delay", "maximum muxing or demuxing delay in microseconds", OFFSET(max_delay), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, 0, INT_MAX, E|D},
|
||||
{"fer", "set error detection aggressivity", OFFSET(error_recognition), FF_OPT_TYPE_INT, {.dbl = FF_ER_CAREFUL }, INT_MIN, INT_MAX, D, "fer"},
|
||||
{"careful", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_ER_CAREFUL }, INT_MIN, INT_MAX, D, "fer"},
|
||||
{"explode", "abort decoding on error recognition", 0, FF_OPT_TYPE_CONST, {.dbl = FF_ER_EXPLODE }, INT_MIN, INT_MAX, D, "fer"},
|
||||
{"fpsprobesize", "number of frames used to probe fps", OFFSET(fps_probe_size), FF_OPT_TYPE_INT, {.dbl = -1}, -1, INT_MAX-1, D},
|
||||
{NULL},
|
||||
};
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include "libavutil/avutil.h"
|
||||
|
||||
#define LIBAVFORMAT_VERSION_MAJOR 53
|
||||
#define LIBAVFORMAT_VERSION_MINOR 6
|
||||
#define LIBAVFORMAT_VERSION_MINOR 7
|
||||
#define LIBAVFORMAT_VERSION_MICRO 0
|
||||
|
||||
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
|
||||
|
@ -4,8 +4,8 @@ AREF = fate-acodec-aref
|
||||
VREF = fate-vsynth1-vref fate-vsynth2-vref
|
||||
REFS = $(AREF) $(VREF)
|
||||
|
||||
$(VREF): ffmpeg$(EXESUF) tests/vsynth1/00.pgm tests/vsynth2/00.pgm
|
||||
$(AREF): ffmpeg$(EXESUF) tests/data/asynth1.sw
|
||||
$(VREF): avconv$(EXESUF) tests/vsynth1/00.pgm tests/vsynth2/00.pgm
|
||||
$(AREF): avconv$(EXESUF) tests/data/asynth1.sw
|
||||
|
||||
ffservertest: ffserver$(EXESUF) tests/vsynth1/00.pgm tests/data/asynth1.sw
|
||||
@echo
|
||||
@ -93,7 +93,7 @@ FATE_UTILS = base64 tiny_psnr
|
||||
|
||||
fate: $(FATE)
|
||||
|
||||
$(FATE): ffmpeg$(EXESUF) $(FATE_UTILS:%=tests/%$(HOSTEXESUF))
|
||||
$(FATE): avconv$(EXESUF) $(FATE_UTILS:%=tests/%$(HOSTEXESUF))
|
||||
@echo "TEST $(@:fate-%=%)"
|
||||
$(Q)$(SRC_PATH)/tests/fate-run.sh $@ "$(SAMPLES)" "$(TARGET_EXEC)" "$(TARGET_PATH)" '$(CMD)' '$(CMP)' '$(REF)' '$(FUZZ)' '$(THREADS)' '$(THREAD_TYPE)'
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# automatic regression test for ffmpeg
|
||||
# automatic regression test for avconv
|
||||
#
|
||||
#
|
||||
#set -x
|
||||
@ -13,10 +13,10 @@ eval do_$test=y
|
||||
|
||||
# generate reference for quality check
|
||||
if [ -n "$do_vref" ]; then
|
||||
do_ffmpeg $raw_ref -f image2 -vcodec pgmyuv -i $raw_src -an -f rawvideo
|
||||
do_avconv $raw_ref -f image2 -vcodec pgmyuv -i $raw_src -an -f rawvideo
|
||||
fi
|
||||
if [ -n "$do_aref" ]; then
|
||||
do_ffmpeg $pcm_ref -ab 128k -ac 2 -ar 44100 -f s16le -i $pcm_src -f wav
|
||||
do_avconv $pcm_ref -ab 128k -ac 2 -ar 44100 -f s16le -i $pcm_src -f wav
|
||||
fi
|
||||
|
||||
if [ -n "$do_mpeg" ] ; then
|
||||
@ -58,7 +58,7 @@ do_video_decoding
|
||||
|
||||
# mpeg2 encoding interlaced
|
||||
file=${outfile}mpeg2reuse.mpg
|
||||
do_ffmpeg $file $DEC_OPTS -me_threshold 256 -i ${target_path}/${outfile}mpeg2thread.mpg $ENC_OPTS -sameq -me_threshold 256 -mb_threshold 1024 -vcodec mpeg2video -f mpeg1video -bf 2 -flags +ildct+ilme -threads 4
|
||||
do_avconv $file $DEC_OPTS -me_threshold 256 -i ${target_path}/${outfile}mpeg2thread.mpg $ENC_OPTS -sameq -me_threshold 256 -mb_threshold 1024 -vcodec mpeg2video -f mpeg1video -bf 2 -flags +ildct+ilme -threads 4
|
||||
do_video_decoding
|
||||
fi
|
||||
|
||||
@ -335,12 +335,12 @@ fi
|
||||
|
||||
if [ -n "$do_wmav1" ] ; then
|
||||
do_audio_encoding wmav1.asf "-acodec wmav1"
|
||||
do_ffmpeg_nomd5 $pcm_dst $DEC_OPTS -i $target_path/$file -f wav
|
||||
do_avconv_nomd5 $pcm_dst $DEC_OPTS -i $target_path/$file -f wav
|
||||
$tiny_psnr $pcm_dst $pcm_ref 2 8192
|
||||
fi
|
||||
if [ -n "$do_wmav2" ] ; then
|
||||
do_audio_encoding wmav2.asf "-acodec wmav2"
|
||||
do_ffmpeg_nomd5 $pcm_dst $DEC_OPTS -i $target_path/$file -f wav
|
||||
do_avconv_nomd5 $pcm_dst $DEC_OPTS -i $target_path/$file -f wav
|
||||
$tiny_psnr $pcm_dst $pcm_ref 2 8192
|
||||
fi
|
||||
|
||||
|
@ -49,28 +49,28 @@ run(){
|
||||
$target_exec $target_path/"$@"
|
||||
}
|
||||
|
||||
ffmpeg(){
|
||||
run ffmpeg -v 0 -threads $threads -thread_type $thread_type "$@"
|
||||
avconv(){
|
||||
run avconv -v 0 -threads $threads -thread_type $thread_type "$@"
|
||||
}
|
||||
|
||||
framecrc(){
|
||||
ffmpeg "$@" -f framecrc -
|
||||
avconv "$@" -f framecrc -
|
||||
}
|
||||
|
||||
framemd5(){
|
||||
ffmpeg "$@" -f framemd5 -
|
||||
avconv "$@" -f framemd5 -
|
||||
}
|
||||
|
||||
crc(){
|
||||
ffmpeg "$@" -f crc -
|
||||
avconv "$@" -f crc -
|
||||
}
|
||||
|
||||
md5(){
|
||||
ffmpeg "$@" md5:
|
||||
avconv "$@" md5:
|
||||
}
|
||||
|
||||
pcm(){
|
||||
ffmpeg "$@" -vn -f s16le -
|
||||
avconv "$@" -vn -f s16le -
|
||||
}
|
||||
|
||||
regtest(){
|
||||
|
@ -14,15 +14,15 @@ eval do_$test=y
|
||||
do_lavf()
|
||||
{
|
||||
file=${outfile}lavf.$1
|
||||
do_ffmpeg $file $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src $DEC_OPTS -ar 44100 -f s16le -i $pcm_src $ENC_OPTS -t 1 -qscale 10 $2
|
||||
do_ffmpeg_crc $file $DEC_OPTS -i $target_path/$file $3
|
||||
do_avconv $file $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src $DEC_OPTS -ar 44100 -f s16le -i $pcm_src $ENC_OPTS -ab 64k -t 1 -qscale 10 $2
|
||||
do_avconv_crc $file $DEC_OPTS -i $target_path/$file $3
|
||||
}
|
||||
|
||||
do_streamed_images()
|
||||
{
|
||||
file=${outfile}${1}pipe.$1
|
||||
do_ffmpeg $file $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src -f image2pipe $ENC_OPTS -t 1 -qscale 10
|
||||
do_ffmpeg_crc $file $DEC_OPTS -f image2pipe -i $target_path/$file
|
||||
do_avconv $file $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src -f image2pipe $ENC_OPTS -t 1 -qscale 10
|
||||
do_avconv_crc $file $DEC_OPTS -f image2pipe -i $target_path/$file
|
||||
}
|
||||
|
||||
do_image_formats()
|
||||
@ -30,17 +30,17 @@ do_image_formats()
|
||||
outfile="$datadir/images/$1/"
|
||||
mkdir -p "$outfile"
|
||||
file=${outfile}%02d.$1
|
||||
run_ffmpeg $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src $2 $ENC_OPTS $3 -t 0.5 -y -qscale 10 $target_path/$file
|
||||
run_avconv $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src $2 $ENC_OPTS $3 -t 0.5 -y -qscale 10 $target_path/$file
|
||||
do_md5sum ${outfile}02.$1
|
||||
do_ffmpeg_crc $file $DEC_OPTS $3 -i $target_path/$file
|
||||
do_avconv_crc $file $DEC_OPTS $3 -i $target_path/$file
|
||||
wc -c ${outfile}02.$1
|
||||
}
|
||||
|
||||
do_audio_only()
|
||||
{
|
||||
file=${outfile}lavf.$1
|
||||
do_ffmpeg $file $DEC_OPTS $2 -ar 44100 -f s16le -i $pcm_src $ENC_OPTS -t 1 -qscale 10 $3
|
||||
do_ffmpeg_crc $file $DEC_OPTS $4 -i $target_path/$file
|
||||
do_avconv $file $DEC_OPTS $2 -ar 44100 -f s16le -i $pcm_src $ENC_OPTS -t 1 -qscale 10 $3
|
||||
do_avconv_crc $file $DEC_OPTS $4 -i $target_path/$file
|
||||
}
|
||||
|
||||
if [ -n "$do_avi" ] ; then
|
||||
@ -53,9 +53,9 @@ fi
|
||||
|
||||
if [ -n "$do_rm" ] ; then
|
||||
file=${outfile}lavf.rm
|
||||
do_ffmpeg $file $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src $DEC_OPTS -ar 44100 -f s16le -i $pcm_src $ENC_OPTS -t 1 -qscale 10 -acodec ac3_fixed
|
||||
do_avconv $file $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src $DEC_OPTS -ar 44100 -f s16le -i $pcm_src $ENC_OPTS -t 1 -qscale 10 -acodec ac3_fixed -ab 64k
|
||||
# broken
|
||||
#do_ffmpeg_crc $file -i $target_path/$file
|
||||
#do_avconv_crc $file -i $target_path/$file
|
||||
fi
|
||||
|
||||
if [ -n "$do_mpg" ] ; then
|
||||
@ -110,8 +110,8 @@ fi
|
||||
# streamed images
|
||||
# mjpeg
|
||||
#file=${outfile}lavf.mjpeg
|
||||
#do_ffmpeg $file -t 1 -qscale 10 -f image2 -vcodec pgmyuv -i $raw_src
|
||||
#do_ffmpeg_crc $file -i $target_path/$file
|
||||
#do_avconv $file -t 1 -qscale 10 -f image2 -vcodec pgmyuv -i $raw_src
|
||||
#do_avconv_crc $file -i $target_path/$file
|
||||
|
||||
if [ -n "$do_pbmpipe" ] ; then
|
||||
do_streamed_images pbm
|
||||
@ -127,14 +127,14 @@ fi
|
||||
|
||||
if [ -n "$do_gif" ] ; then
|
||||
file=${outfile}lavf.gif
|
||||
do_ffmpeg $file $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src $ENC_OPTS -t 1 -qscale 10 -pix_fmt rgb24
|
||||
do_ffmpeg_crc $file $DEC_OPTS -i $target_path/$file -pix_fmt rgb24
|
||||
do_avconv $file $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src $ENC_OPTS -t 1 -qscale 10 -pix_fmt rgb24
|
||||
do_avconv_crc $file $DEC_OPTS -i $target_path/$file -pix_fmt rgb24
|
||||
fi
|
||||
|
||||
if [ -n "$do_yuv4mpeg" ] ; then
|
||||
file=${outfile}lavf.y4m
|
||||
do_ffmpeg $file $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src $ENC_OPTS -t 1 -qscale 10
|
||||
#do_ffmpeg_crc $file -i $target_path/$file
|
||||
do_avconv $file $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src $ENC_OPTS -t 1 -qscale 10
|
||||
#do_avconv_crc $file -i $target_path/$file
|
||||
fi
|
||||
|
||||
# image formats
|
||||
@ -227,9 +227,9 @@ conversions="yuv420p yuv422p yuv444p yuyv422 yuv410p yuv411p yuvj420p \
|
||||
monob yuv440p yuvj440p"
|
||||
for pix_fmt in $conversions ; do
|
||||
file=${outfile}${pix_fmt}.yuv
|
||||
run_ffmpeg $DEC_OPTS -r 1 -t 1 -f image2 -vcodec pgmyuv -i $raw_src \
|
||||
run_avconv $DEC_OPTS -r 1 -t 1 -f image2 -vcodec pgmyuv -i $raw_src \
|
||||
$ENC_OPTS -f rawvideo -s 352x288 -pix_fmt $pix_fmt $target_path/$raw_dst
|
||||
do_ffmpeg $file $DEC_OPTS -f rawvideo -s 352x288 -pix_fmt $pix_fmt -i $target_path/$raw_dst \
|
||||
do_avconv $file $DEC_OPTS -f rawvideo -s 352x288 -pix_fmt $pix_fmt -i $target_path/$raw_dst \
|
||||
$ENC_OPTS -f rawvideo -s 352x288 -pix_fmt yuv444p
|
||||
done
|
||||
fi
|
||||
|
@ -16,7 +16,7 @@ do_video_filter() {
|
||||
filters=$2
|
||||
shift 2
|
||||
printf '%-20s' $label
|
||||
run_ffmpeg $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src \
|
||||
run_avconv $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src \
|
||||
$ENC_OPTS -vf "$filters" -vcodec rawvideo $* -f nut md5:
|
||||
}
|
||||
|
||||
@ -49,7 +49,7 @@ do_lavfi_pixfmts(){
|
||||
out_fmts=${outfile}${1}_out_fmts
|
||||
|
||||
# exclude pixel formats which are not supported as input
|
||||
$ffmpeg -pix_fmts list 2>/dev/null | sed -ne '9,$p' | grep '^\..\.' | cut -d' ' -f2 | sort >$exclude_fmts
|
||||
$avconv -pix_fmts list 2>/dev/null | sed -ne '9,$p' | grep '^\..\.' | cut -d' ' -f2 | sort >$exclude_fmts
|
||||
$showfiltfmts scale | awk -F '[ \r]' '/^OUTPUT/{ fmt=substr($3, 5); print fmt }' | sort | comm -23 - $exclude_fmts >$out_fmts
|
||||
|
||||
pix_fmts=$($showfiltfmts $filter $filter_args | awk -F '[ \r]' '/^INPUT/{ fmt=substr($3, 5); print fmt }' | sort | comm -12 - $out_fmts)
|
||||
@ -70,7 +70,7 @@ do_lavfi_pixfmts "scale" "200:100"
|
||||
do_lavfi_pixfmts "vflip" ""
|
||||
|
||||
if [ -n "$do_pixdesc" ]; then
|
||||
pix_fmts="$($ffmpeg -pix_fmts list 2>/dev/null | sed -ne '9,$p' | grep '^IO' | cut -d' ' -f2 | sort)"
|
||||
pix_fmts="$($avconv -pix_fmts list 2>/dev/null | sed -ne '9,$p' | grep '^IO' | cut -d' ' -f2 | sort)"
|
||||
for pix_fmt in $pix_fmts; do
|
||||
do_video_filter $pix_fmt "slicify=random,format=$pix_fmt,pixdesctest" -pix_fmt $pix_fmt
|
||||
done
|
||||
|
@ -16,106 +16,106 @@
|
||||
0, 112500, 276480, 0x5f7a0d4f
|
||||
0, 120000, 276480, 0x5f7a0d4f
|
||||
0, 127500, 276480, 0x5f7a0d4f
|
||||
0, 135000, 276480, 0x2d722f8a
|
||||
0, 142500, 276480, 0xebbb3c8f
|
||||
0, 150000, 276480, 0x8574c868
|
||||
0, 135000, 276480, 0x75641594
|
||||
0, 142500, 276480, 0x32ee3526
|
||||
0, 150000, 276480, 0x5ce39368
|
||||
0, 157500, 276480, 0x4ec1e418
|
||||
0, 165000, 276480, 0x95f22651
|
||||
0, 172500, 276480, 0x071d897e
|
||||
0, 180000, 276480, 0x9f7623f9
|
||||
0, 187500, 276480, 0x86d4dedf
|
||||
0, 195000, 276480, 0xc0a0be22
|
||||
0, 202500, 276480, 0xc5902aec
|
||||
0, 210000, 276480, 0xe000f066
|
||||
0, 217500, 276480, 0x0b2a48d5
|
||||
0, 225000, 276480, 0xa1565256
|
||||
0, 232500, 276480, 0x8de3ceb3
|
||||
0, 240000, 276480, 0x654b564a
|
||||
0, 165000, 276480, 0x85cbc3b5
|
||||
0, 172500, 276480, 0x377c7b46
|
||||
0, 180000, 276480, 0x756a4a2e
|
||||
0, 187500, 276480, 0xcb379547
|
||||
0, 195000, 276480, 0x99c085be
|
||||
0, 202500, 276480, 0xe479ffed
|
||||
0, 210000, 276480, 0x1e4fae19
|
||||
0, 217500, 276480, 0x776412ef
|
||||
0, 225000, 276480, 0x58ce0f38
|
||||
0, 232500, 276480, 0x5ab69b27
|
||||
0, 240000, 276480, 0xc3db9706
|
||||
0, 247500, 276480, 0xc9c57884
|
||||
0, 255000, 276480, 0x89cdcdd4
|
||||
0, 262500, 276480, 0x3594fe61
|
||||
0, 270000, 276480, 0x9d082a81
|
||||
0, 277500, 276480, 0x4e6cd0c3
|
||||
0, 285000, 276480, 0xc129765f
|
||||
0, 292500, 276480, 0x92a04c99
|
||||
0, 300000, 276480, 0x5ca62953
|
||||
0, 307500, 276480, 0xb7e478aa
|
||||
0, 315000, 276480, 0x932735d5
|
||||
0, 322500, 276480, 0xaaa2d7aa
|
||||
0, 330000, 276480, 0xd1329996
|
||||
0, 255000, 276480, 0x000b5269
|
||||
0, 262500, 276480, 0x27ff7a5d
|
||||
0, 270000, 276480, 0x70647530
|
||||
0, 277500, 276480, 0x97612c4b
|
||||
0, 285000, 276480, 0xdf4e04d7
|
||||
0, 292500, 276480, 0xbd98f57c
|
||||
0, 300000, 276480, 0x5163b29b
|
||||
0, 307500, 276480, 0x99170e64
|
||||
0, 315000, 276480, 0x8a4e991f
|
||||
0, 322500, 276480, 0x6a45425f
|
||||
0, 330000, 276480, 0x7bf6b1ef
|
||||
0, 337500, 276480, 0x6de1e34b
|
||||
0, 345000, 276480, 0x8c963c9b
|
||||
0, 352500, 276480, 0xce6eff29
|
||||
0, 360000, 276480, 0x25412f7e
|
||||
0, 367500, 276480, 0x11a5ad85
|
||||
0, 375000, 276480, 0x26ea3248
|
||||
0, 382500, 276480, 0x86c35fa4
|
||||
0, 390000, 276480, 0xa98a2d38
|
||||
0, 397500, 276480, 0xed827333
|
||||
0, 405000, 276480, 0x5d44a824
|
||||
0, 412500, 276480, 0x46d54d04
|
||||
0, 420000, 276480, 0x413fd26a
|
||||
0, 345000, 276480, 0xdcaaa99a
|
||||
0, 352500, 276480, 0xd1e98808
|
||||
0, 360000, 276480, 0x6e2d524e
|
||||
0, 367500, 276480, 0x22c50a3d
|
||||
0, 375000, 276480, 0x62b76407
|
||||
0, 382500, 276480, 0x51e9b3eb
|
||||
0, 390000, 276480, 0x441f7afd
|
||||
0, 397500, 276480, 0xfb01efc6
|
||||
0, 405000, 276480, 0x294bb441
|
||||
0, 412500, 276480, 0xe04ac45e
|
||||
0, 420000, 276480, 0x58f275ea
|
||||
0, 427500, 276480, 0xf0b3b71b
|
||||
0, 435000, 276480, 0x459bc06d
|
||||
0, 442500, 276480, 0x4199cd45
|
||||
0, 450000, 276480, 0xa8d35683
|
||||
0, 457500, 276480, 0x9a3e7de0
|
||||
0, 465000, 276480, 0x5a30f666
|
||||
0, 472500, 276480, 0x40152668
|
||||
0, 480000, 276480, 0x90c4d22c
|
||||
0, 487500, 276480, 0x5cbaacc9
|
||||
0, 495000, 276480, 0x72b658f1
|
||||
0, 502500, 276480, 0x0ba3dcc9
|
||||
0, 510000, 276480, 0x259ed5c1
|
||||
0, 435000, 276480, 0x674e34e4
|
||||
0, 442500, 276480, 0x41dda2d9
|
||||
0, 450000, 276480, 0xf46ba7fb
|
||||
0, 457500, 276480, 0x28b54815
|
||||
0, 465000, 276480, 0xaf2b5d89
|
||||
0, 472500, 276480, 0x8facba58
|
||||
0, 480000, 276480, 0x28a63236
|
||||
0, 487500, 276480, 0x1ad43fd7
|
||||
0, 495000, 276480, 0x71507bd2
|
||||
0, 502500, 276480, 0x35626022
|
||||
0, 510000, 276480, 0x7c1139b3
|
||||
0, 517500, 276480, 0x7fd73a99
|
||||
0, 525000, 276480, 0x488980c5
|
||||
0, 532500, 276480, 0x1d4c96a5
|
||||
0, 540000, 276480, 0x41ced7f2
|
||||
0, 547500, 276480, 0xd62d1837
|
||||
0, 555000, 276480, 0xf5fd9d20
|
||||
0, 562500, 276480, 0x2af91fda
|
||||
0, 570000, 276480, 0x38ce229d
|
||||
0, 577500, 276480, 0xf3a712c0
|
||||
0, 585000, 276480, 0x57b111d2
|
||||
0, 592500, 276480, 0x8556b792
|
||||
0, 600000, 276480, 0xb32d0896
|
||||
0, 525000, 276480, 0xb52e1aa2
|
||||
0, 532500, 276480, 0xd6f82cae
|
||||
0, 540000, 276480, 0xf88f75d4
|
||||
0, 547500, 276480, 0x04a8e3ee
|
||||
0, 555000, 276480, 0xa29f5b01
|
||||
0, 562500, 276480, 0x754ceaf5
|
||||
0, 570000, 276480, 0x5a38b4af
|
||||
0, 577500, 276480, 0xfcebc261
|
||||
0, 585000, 276480, 0x3d3ca985
|
||||
0, 592500, 276480, 0x94a03c75
|
||||
0, 600000, 276480, 0x2f98911c
|
||||
0, 607500, 276480, 0x923b9937
|
||||
0, 615000, 276480, 0x0da1e7e3
|
||||
0, 622500, 276480, 0x7f172382
|
||||
0, 630000, 276480, 0x93622b88
|
||||
0, 637500, 276480, 0x2599d540
|
||||
0, 645000, 276480, 0xed20c105
|
||||
0, 652500, 276480, 0x62ce256e
|
||||
0, 660000, 276480, 0x286a04bb
|
||||
0, 667500, 276480, 0x423f7e7c
|
||||
0, 675000, 276480, 0x21fc252a
|
||||
0, 682500, 276480, 0xf8a8e8ee
|
||||
0, 690000, 276480, 0x770d4a8d
|
||||
0, 615000, 276480, 0xefab7ffd
|
||||
0, 622500, 276480, 0x6b9fbc80
|
||||
0, 630000, 276480, 0xe4bdbd1e
|
||||
0, 637500, 276480, 0x225a56c0
|
||||
0, 645000, 276480, 0xf58b1b7c
|
||||
0, 652500, 276480, 0xbaffcdcc
|
||||
0, 660000, 276480, 0xeb6eb88f
|
||||
0, 667500, 276480, 0xdb753d35
|
||||
0, 675000, 276480, 0xea80a82e
|
||||
0, 682500, 276480, 0x2aae902a
|
||||
0, 690000, 276480, 0x9b9ee961
|
||||
0, 697500, 276480, 0xaa12b6fd
|
||||
0, 705000, 276480, 0xdc7221a8
|
||||
0, 712500, 276480, 0x487eeb30
|
||||
0, 720000, 276480, 0x1e74f2db
|
||||
0, 727500, 276480, 0x40ae2bc3
|
||||
0, 735000, 276480, 0x9ca9b930
|
||||
0, 742500, 276480, 0x9fb19b0f
|
||||
0, 750000, 276480, 0x7bdf836c
|
||||
0, 757500, 276480, 0x1e607ba7
|
||||
0, 765000, 276480, 0xbd96578b
|
||||
0, 772500, 276480, 0x2124bf07
|
||||
0, 780000, 276480, 0x4895e27a
|
||||
0, 705000, 276480, 0x50c31e73
|
||||
0, 712500, 276480, 0xdd9fb89f
|
||||
0, 720000, 276480, 0xaf82399a
|
||||
0, 727500, 276480, 0x7ce5f23c
|
||||
0, 735000, 276480, 0x5aaa7519
|
||||
0, 742500, 276480, 0xe45a5599
|
||||
0, 750000, 276480, 0x704411fb
|
||||
0, 757500, 276480, 0x9d7430a1
|
||||
0, 765000, 276480, 0x2c230702
|
||||
0, 772500, 276480, 0x4a4f76cd
|
||||
0, 780000, 276480, 0x27f54854
|
||||
0, 787500, 276480, 0x694d76e3
|
||||
0, 795000, 276480, 0xe70df513
|
||||
0, 802500, 276480, 0xcacafe6b
|
||||
0, 810000, 276480, 0x64087748
|
||||
0, 817500, 276480, 0x571fda23
|
||||
0, 825000, 276480, 0x8c86cbe9
|
||||
0, 832500, 276480, 0xc8ea4671
|
||||
0, 840000, 276480, 0xbfb74300
|
||||
0, 847500, 276480, 0xbe1e3770
|
||||
0, 855000, 276480, 0x757a0232
|
||||
0, 862500, 276480, 0xa5f50c84
|
||||
0, 870000, 276480, 0x6d95f808
|
||||
0, 795000, 276480, 0x525463e2
|
||||
0, 802500, 276480, 0x819898f9
|
||||
0, 810000, 276480, 0xeeed00fc
|
||||
0, 817500, 276480, 0xb6f99ee3
|
||||
0, 825000, 276480, 0xefc83107
|
||||
0, 832500, 276480, 0xbb22e024
|
||||
0, 840000, 276480, 0x300f922a
|
||||
0, 847500, 276480, 0x826fc3bd
|
||||
0, 855000, 276480, 0x679a53f8
|
||||
0, 862500, 276480, 0x976c9e93
|
||||
0, 870000, 276480, 0xb194656e
|
||||
0, 877500, 276480, 0xf002c5ca
|
||||
0, 885000, 276480, 0x1a2abb26
|
||||
0, 892500, 276480, 0x6cf69bf2
|
||||
0, 885000, 276480, 0xb243dda5
|
||||
0, 892500, 276480, 0x1700efbb
|
||||
0, 900000, 276480, 0x8f316c66
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# common regression functions for ffmpeg
|
||||
# common regression functions for avconv
|
||||
#
|
||||
#
|
||||
|
||||
@ -18,7 +18,7 @@ this="$test.$test_ref"
|
||||
outfile="$datadir/$test_ref/"
|
||||
|
||||
# various files
|
||||
ffmpeg="$target_exec ${target_path}/ffmpeg"
|
||||
avconv="$target_exec ${target_path}/avconv"
|
||||
tiny_psnr="tests/tiny_psnr"
|
||||
raw_src="${target_path}/$raw_src_dir/%02d.pgm"
|
||||
raw_dst="$datadir/$this.out.yuv"
|
||||
@ -43,23 +43,23 @@ echov(){
|
||||
|
||||
. $(dirname $0)/md5.sh
|
||||
|
||||
FFMPEG_OPTS="-v 0 -y"
|
||||
AVCONV_OPTS="-v 0 -y"
|
||||
COMMON_OPTS="-flags +bitexact -idct simple -sws_flags +accurate_rnd+bitexact"
|
||||
DEC_OPTS="$COMMON_OPTS -threads $threads"
|
||||
ENC_OPTS="$COMMON_OPTS -threads 1 -dct fastint"
|
||||
|
||||
run_ffmpeg()
|
||||
run_avconv()
|
||||
{
|
||||
$echov $ffmpeg $FFMPEG_OPTS $*
|
||||
$ffmpeg $FFMPEG_OPTS $*
|
||||
$echov $avconv $AVCONV_OPTS $*
|
||||
$avconv $AVCONV_OPTS $*
|
||||
}
|
||||
|
||||
do_ffmpeg()
|
||||
do_avconv()
|
||||
{
|
||||
f="$1"
|
||||
shift
|
||||
set -- $* ${target_path}/$f
|
||||
run_ffmpeg $*
|
||||
run_avconv $*
|
||||
do_md5sum $f
|
||||
if [ $f = $raw_dst ] ; then
|
||||
$tiny_psnr $f $raw_ref
|
||||
@ -70,12 +70,12 @@ do_ffmpeg()
|
||||
fi
|
||||
}
|
||||
|
||||
do_ffmpeg_nomd5()
|
||||
do_avconv_nomd5()
|
||||
{
|
||||
f="$1"
|
||||
shift
|
||||
set -- $* ${target_path}/$f
|
||||
run_ffmpeg $*
|
||||
run_avconv $*
|
||||
if [ $f = $raw_dst ] ; then
|
||||
$tiny_psnr $f $raw_ref
|
||||
elif [ $f = $pcm_dst ] ; then
|
||||
@ -85,32 +85,32 @@ do_ffmpeg_nomd5()
|
||||
fi
|
||||
}
|
||||
|
||||
do_ffmpeg_crc()
|
||||
do_avconv_crc()
|
||||
{
|
||||
f="$1"
|
||||
shift
|
||||
run_ffmpeg $* -f crc "$target_crcfile"
|
||||
run_avconv $* -f crc "$target_crcfile"
|
||||
echo "$f $(cat $crcfile)"
|
||||
}
|
||||
|
||||
do_video_decoding()
|
||||
{
|
||||
do_ffmpeg $raw_dst $DEC_OPTS $1 -i $target_path/$file -f rawvideo $ENC_OPTS -vsync 0 $2
|
||||
do_avconv $raw_dst $DEC_OPTS $1 -i $target_path/$file -f rawvideo $ENC_OPTS -vsync 0 $2
|
||||
}
|
||||
|
||||
do_video_encoding()
|
||||
{
|
||||
file=${outfile}$1
|
||||
do_ffmpeg $file $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src $ENC_OPTS $2
|
||||
do_avconv $file $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src $ENC_OPTS $2
|
||||
}
|
||||
|
||||
do_audio_encoding()
|
||||
{
|
||||
file=${outfile}$1
|
||||
do_ffmpeg $file $DEC_OPTS -ac 2 -ar 44100 -f s16le -i $pcm_src -ab 128k $ENC_OPTS $2
|
||||
do_avconv $file $DEC_OPTS -ac 2 -ar 44100 -f s16le -i $pcm_src -ab 128k $ENC_OPTS $2
|
||||
}
|
||||
|
||||
do_audio_decoding()
|
||||
{
|
||||
do_ffmpeg $pcm_dst $DEC_OPTS -i $target_path/$file -sample_fmt s16 -f wav
|
||||
do_avconv $pcm_dst $DEC_OPTS -i $target_path/$file -sample_fmt s16 -f wav
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user