mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
Change semantic of CONFIG_*, HAVE_* and ARCH_*.
They are now always defined to either 0 or 1. Originally committed as revision 16590 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
959da985b0
commit
b250f9c66d
16
cmdutils.c
16
cmdutils.c
@ -30,19 +30,19 @@
|
|||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "libavformat/avformat.h"
|
#include "libavformat/avformat.h"
|
||||||
#ifdef CONFIG_AVFILTER
|
#if CONFIG_AVFILTER
|
||||||
#include "libavfilter/avfilter.h"
|
#include "libavfilter/avfilter.h"
|
||||||
#endif
|
#endif
|
||||||
#include "libavdevice/avdevice.h"
|
#include "libavdevice/avdevice.h"
|
||||||
#include "libswscale/swscale.h"
|
#include "libswscale/swscale.h"
|
||||||
#ifdef CONFIG_POSTPROC
|
#if CONFIG_POSTPROC
|
||||||
#include "libpostproc/postprocess.h"
|
#include "libpostproc/postprocess.h"
|
||||||
#endif
|
#endif
|
||||||
#include "libavutil/avstring.h"
|
#include "libavutil/avstring.h"
|
||||||
#include "libavcodec/opt.h"
|
#include "libavcodec/opt.h"
|
||||||
#include "cmdutils.h"
|
#include "cmdutils.h"
|
||||||
#include "version.h"
|
#include "version.h"
|
||||||
#ifdef CONFIG_NETWORK
|
#if CONFIG_NETWORK
|
||||||
#include "libavformat/network.h"
|
#include "libavformat/network.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -255,7 +255,7 @@ void print_error(const char *filename, int err)
|
|||||||
case AVERROR(ENOENT):
|
case AVERROR(ENOENT):
|
||||||
fprintf(stderr, "%s: no such file or directory\n", filename);
|
fprintf(stderr, "%s: no such file or directory\n", filename);
|
||||||
break;
|
break;
|
||||||
#ifdef CONFIG_NETWORK
|
#if CONFIG_NETWORK
|
||||||
case AVERROR(FF_NETERROR(EPROTONOSUPPORT)):
|
case AVERROR(FF_NETERROR(EPROTONOSUPPORT)):
|
||||||
fprintf(stderr, "%s: Unsupported network protocol\n", filename);
|
fprintf(stderr, "%s: Unsupported network protocol\n", filename);
|
||||||
break;
|
break;
|
||||||
@ -279,13 +279,13 @@ static void print_all_lib_versions(FILE* outstream, int indent)
|
|||||||
PRINT_LIB_VERSION(outstream, avcodec, AVCODEC, indent);
|
PRINT_LIB_VERSION(outstream, avcodec, AVCODEC, indent);
|
||||||
PRINT_LIB_VERSION(outstream, avformat, AVFORMAT, indent);
|
PRINT_LIB_VERSION(outstream, avformat, AVFORMAT, indent);
|
||||||
PRINT_LIB_VERSION(outstream, avdevice, AVDEVICE, indent);
|
PRINT_LIB_VERSION(outstream, avdevice, AVDEVICE, indent);
|
||||||
#ifdef CONFIG_AVFILTER
|
#if CONFIG_AVFILTER
|
||||||
PRINT_LIB_VERSION(outstream, avfilter, AVFILTER, indent);
|
PRINT_LIB_VERSION(outstream, avfilter, AVFILTER, indent);
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_SWSCALE
|
#if CONFIG_SWSCALE
|
||||||
PRINT_LIB_VERSION(outstream, swscale, SWSCALE, indent);
|
PRINT_LIB_VERSION(outstream, swscale, SWSCALE, indent);
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_POSTPROC
|
#if CONFIG_POSTPROC
|
||||||
PRINT_LIB_VERSION(outstream, postproc, POSTPROC, indent);
|
PRINT_LIB_VERSION(outstream, postproc, POSTPROC, indent);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -311,7 +311,7 @@ void show_version(void) {
|
|||||||
|
|
||||||
void show_license(void)
|
void show_license(void)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_NONFREE
|
#if CONFIG_NONFREE
|
||||||
printf(
|
printf(
|
||||||
"This version of %s has nonfree parts compiled in.\n"
|
"This version of %s has nonfree parts compiled in.\n"
|
||||||
"Therefore it is not legally redistributable.\n",
|
"Therefore it is not legally redistributable.\n",
|
||||||
|
1
configure
vendored
1
configure
vendored
@ -430,6 +430,7 @@ print_config(){
|
|||||||
echo "#define ENABLE_${ucname} 1" >> $header
|
echo "#define ENABLE_${ucname} 1" >> $header
|
||||||
echo "${pfx}${ucname}=yes" >> $makefile
|
echo "${pfx}${ucname}=yes" >> $makefile
|
||||||
else
|
else
|
||||||
|
echo "#define ${pfx}${ucname} 0" >> $header
|
||||||
echo "#define ENABLE_${ucname} 0" >> $header
|
echo "#define ENABLE_${ucname} 0" >> $header
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
@ -426,7 +426,7 @@ you need the debug information, used the *_g versions.
|
|||||||
@section I do not like the LGPL, can I contribute code under the GPL instead?
|
@section I do not like the LGPL, can I contribute code under the GPL instead?
|
||||||
|
|
||||||
Yes, as long as the code is optional and can easily and cleanly be placed
|
Yes, as long as the code is optional and can easily and cleanly be placed
|
||||||
under #ifdef CONFIG_GPL without breaking anything. So for example a new codec
|
under #if CONFIG_GPL without breaking anything. So for example a new codec
|
||||||
or filter would be OK under GPL while a bug fix to LGPL code would not.
|
or filter would be OK under GPL while a bug fix to LGPL code would not.
|
||||||
|
|
||||||
@section I want to compile xyz.c alone but my compiler produced many errors.
|
@section I want to compile xyz.c alone but my compiler produced many errors.
|
||||||
|
36
ffmpeg.c
36
ffmpeg.c
@ -41,23 +41,23 @@
|
|||||||
#include "libavutil/avstring.h"
|
#include "libavutil/avstring.h"
|
||||||
#include "libavformat/os_support.h"
|
#include "libavformat/os_support.h"
|
||||||
|
|
||||||
#ifdef HAVE_SYS_RESOURCE_H
|
#if HAVE_SYS_RESOURCE_H
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/resource.h>
|
#include <sys/resource.h>
|
||||||
#elif defined(HAVE_GETPROCESSTIMES)
|
#elif HAVE_GETPROCESSTIMES
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_SYS_SELECT_H
|
#if HAVE_SYS_SELECT_H
|
||||||
#include <sys/select.h>
|
#include <sys/select.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_TERMIOS_H
|
#if HAVE_TERMIOS_H
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <termios.h>
|
#include <termios.h>
|
||||||
#elif defined(HAVE_CONIO_H)
|
#elif HAVE_CONIO_H
|
||||||
#include <conio.h>
|
#include <conio.h>
|
||||||
#endif
|
#endif
|
||||||
#undef time //needed because HAVE_AV_CONFIG_H is defined on top
|
#undef time //needed because HAVE_AV_CONFIG_H is defined on top
|
||||||
@ -295,7 +295,7 @@ typedef struct AVInputFile {
|
|||||||
int nb_streams; /* nb streams we are aware of */
|
int nb_streams; /* nb streams we are aware of */
|
||||||
} AVInputFile;
|
} AVInputFile;
|
||||||
|
|
||||||
#ifdef HAVE_TERMIOS_H
|
#if HAVE_TERMIOS_H
|
||||||
|
|
||||||
/* init terminal so that we can grab keys */
|
/* init terminal so that we can grab keys */
|
||||||
static struct termios oldtty;
|
static struct termios oldtty;
|
||||||
@ -303,7 +303,7 @@ static struct termios oldtty;
|
|||||||
|
|
||||||
static void term_exit(void)
|
static void term_exit(void)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_TERMIOS_H
|
#if HAVE_TERMIOS_H
|
||||||
tcsetattr (0, TCSANOW, &oldtty);
|
tcsetattr (0, TCSANOW, &oldtty);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -319,7 +319,7 @@ sigterm_handler(int sig)
|
|||||||
|
|
||||||
static void term_init(void)
|
static void term_init(void)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_TERMIOS_H
|
#if HAVE_TERMIOS_H
|
||||||
struct termios tty;
|
struct termios tty;
|
||||||
|
|
||||||
tcgetattr (0, &tty);
|
tcgetattr (0, &tty);
|
||||||
@ -344,7 +344,7 @@ static void term_init(void)
|
|||||||
register a function to be called at normal program termination
|
register a function to be called at normal program termination
|
||||||
*/
|
*/
|
||||||
atexit(term_exit);
|
atexit(term_exit);
|
||||||
#ifdef CONFIG_BEOS_NETSERVER
|
#if CONFIG_BEOS_NETSERVER
|
||||||
fcntl(0, F_SETFL, fcntl(0, F_GETFL) | O_NONBLOCK);
|
fcntl(0, F_SETFL, fcntl(0, F_GETFL) | O_NONBLOCK);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -352,10 +352,10 @@ static void term_init(void)
|
|||||||
/* read a key without blocking */
|
/* read a key without blocking */
|
||||||
static int read_key(void)
|
static int read_key(void)
|
||||||
{
|
{
|
||||||
#if defined(HAVE_TERMIOS_H)
|
#if HAVE_TERMIOS_H
|
||||||
int n = 1;
|
int n = 1;
|
||||||
unsigned char ch;
|
unsigned char ch;
|
||||||
#ifndef CONFIG_BEOS_NETSERVER
|
#if !CONFIG_BEOS_NETSERVER
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
fd_set rfds;
|
fd_set rfds;
|
||||||
|
|
||||||
@ -372,7 +372,7 @@ static int read_key(void)
|
|||||||
|
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
#elif defined(HAVE_CONIO_H)
|
#elif HAVE_CONIO_H
|
||||||
if(kbhit())
|
if(kbhit())
|
||||||
return(getch());
|
return(getch());
|
||||||
#endif
|
#endif
|
||||||
@ -427,7 +427,7 @@ static int av_exit(int ret)
|
|||||||
|
|
||||||
av_free(video_standard);
|
av_free(video_standard);
|
||||||
|
|
||||||
#ifdef CONFIG_POWERPC_PERF
|
#if CONFIG_POWERPC_PERF
|
||||||
void powerpc_display_perf_report(void);
|
void powerpc_display_perf_report(void);
|
||||||
powerpc_display_perf_report();
|
powerpc_display_perf_report();
|
||||||
#endif /* CONFIG_POWERPC_PERF */
|
#endif /* CONFIG_POWERPC_PERF */
|
||||||
@ -2553,7 +2553,7 @@ static void opt_top_field_first(const char *arg)
|
|||||||
static int opt_thread_count(const char *opt, const char *arg)
|
static int opt_thread_count(const char *opt, const char *arg)
|
||||||
{
|
{
|
||||||
thread_count= parse_number_or_die(opt, arg, OPT_INT64, 0, INT_MAX);
|
thread_count= parse_number_or_die(opt, arg, OPT_INT64, 0, INT_MAX);
|
||||||
#if !defined(HAVE_THREADS)
|
#if !HAVE_THREADS
|
||||||
if (verbose >= 0)
|
if (verbose >= 0)
|
||||||
fprintf(stderr, "Warning: not compiled with thread support, using thread emulation\n");
|
fprintf(stderr, "Warning: not compiled with thread support, using thread emulation\n");
|
||||||
#endif
|
#endif
|
||||||
@ -2626,7 +2626,7 @@ static void opt_video_tag(const char *arg)
|
|||||||
video_codec_tag= arg[0] + (arg[1]<<8) + (arg[2]<<16) + (arg[3]<<24);
|
video_codec_tag= arg[0] + (arg[1]<<8) + (arg[2]<<16) + (arg[3]<<24);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_VHOOK
|
#if CONFIG_VHOOK
|
||||||
static void add_frame_hooker(const char *arg)
|
static void add_frame_hooker(const char *arg)
|
||||||
{
|
{
|
||||||
int argc = 0;
|
int argc = 0;
|
||||||
@ -3416,12 +3416,12 @@ static void opt_pass(const char *pass_str)
|
|||||||
|
|
||||||
static int64_t getutime(void)
|
static int64_t getutime(void)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_GETRUSAGE
|
#if HAVE_GETRUSAGE
|
||||||
struct rusage rusage;
|
struct rusage rusage;
|
||||||
|
|
||||||
getrusage(RUSAGE_SELF, &rusage);
|
getrusage(RUSAGE_SELF, &rusage);
|
||||||
return (rusage.ru_utime.tv_sec * 1000000LL) + rusage.ru_utime.tv_usec;
|
return (rusage.ru_utime.tv_sec * 1000000LL) + rusage.ru_utime.tv_usec;
|
||||||
#elif defined(HAVE_GETPROCESSTIMES)
|
#elif HAVE_GETPROCESSTIMES
|
||||||
HANDLE proc;
|
HANDLE proc;
|
||||||
FILETIME c, e, k, u;
|
FILETIME c, e, k, u;
|
||||||
proc = GetCurrentProcess();
|
proc = GetCurrentProcess();
|
||||||
@ -3828,7 +3828,7 @@ static const OptionDef options[] = {
|
|||||||
{ "psnr", OPT_BOOL | OPT_EXPERT | OPT_VIDEO, {(void*)&do_psnr}, "calculate PSNR of compressed frames" },
|
{ "psnr", OPT_BOOL | OPT_EXPERT | OPT_VIDEO, {(void*)&do_psnr}, "calculate PSNR of compressed frames" },
|
||||||
{ "vstats", OPT_EXPERT | OPT_VIDEO, {(void*)&opt_vstats}, "dump video coding statistics to file" },
|
{ "vstats", OPT_EXPERT | OPT_VIDEO, {(void*)&opt_vstats}, "dump video coding statistics to file" },
|
||||||
{ "vstats_file", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_vstats_file}, "dump video coding statistics to file", "file" },
|
{ "vstats_file", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_vstats_file}, "dump video coding statistics to file", "file" },
|
||||||
#ifdef CONFIG_VHOOK
|
#if CONFIG_VHOOK
|
||||||
{ "vhook", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)add_frame_hooker}, "insert video processing module", "module" },
|
{ "vhook", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)add_frame_hooker}, "insert video processing module", "module" },
|
||||||
#endif
|
#endif
|
||||||
{ "intra_matrix", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_intra_matrix}, "specify intra matrix coeffs", "matrix" },
|
{ "intra_matrix", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_intra_matrix}, "specify intra matrix coeffs", "matrix" },
|
||||||
|
6
ffplay.c
6
ffplay.c
@ -2019,7 +2019,7 @@ static int decode_thread(void *arg)
|
|||||||
else
|
else
|
||||||
av_read_play(ic);
|
av_read_play(ic);
|
||||||
}
|
}
|
||||||
#if defined(CONFIG_RTSP_DEMUXER) || defined(CONFIG_MMSH_PROTOCOL)
|
#if CONFIG_RTSP_DEMUXER || CONFIG_MMSH_PROTOCOL
|
||||||
if (is->paused &&
|
if (is->paused &&
|
||||||
(!strcmp(ic->iformat->name, "rtsp") ||
|
(!strcmp(ic->iformat->name, "rtsp") ||
|
||||||
(ic->pb && !strcmp(url_fileno(ic->pb)->prot->name, "mmsh")))) {
|
(ic->pb && !strcmp(url_fileno(ic->pb)->prot->name, "mmsh")))) {
|
||||||
@ -2467,7 +2467,7 @@ static int opt_vismv(const char *opt, const char *arg)
|
|||||||
static int opt_thread_count(const char *opt, const char *arg)
|
static int opt_thread_count(const char *opt, const char *arg)
|
||||||
{
|
{
|
||||||
thread_count= parse_number_or_die(opt, arg, OPT_INT64, 0, INT_MAX);
|
thread_count= parse_number_or_die(opt, arg, OPT_INT64, 0, INT_MAX);
|
||||||
#if !defined(HAVE_THREADS)
|
#if !HAVE_THREADS
|
||||||
fprintf(stderr, "Warning: not compiled with thread support, using thread emulation\n");
|
fprintf(stderr, "Warning: not compiled with thread support, using thread emulation\n");
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
@ -2579,7 +2579,7 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!display_disable) {
|
if (!display_disable) {
|
||||||
#ifdef HAVE_SDL_VIDEO_SIZE
|
#if HAVE_SDL_VIDEO_SIZE
|
||||||
const SDL_VideoInfo *vi = SDL_GetVideoInfo();
|
const SDL_VideoInfo *vi = SDL_GetVideoInfo();
|
||||||
fs_screen_width = vi->current_w;
|
fs_screen_width = vi->current_w;
|
||||||
fs_screen_height = vi->current_h;
|
fs_screen_height = vi->current_h;
|
||||||
|
10
ffserver.c
10
ffserver.c
@ -22,7 +22,7 @@
|
|||||||
#define _XOPEN_SOURCE 600
|
#define _XOPEN_SOURCE 600
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#ifndef HAVE_CLOSESOCKET
|
#if !HAVE_CLOSESOCKET
|
||||||
#define closesocket close
|
#define closesocket close
|
||||||
#endif
|
#endif
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@ -41,7 +41,7 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#ifdef HAVE_POLL_H
|
#if HAVE_POLL_H
|
||||||
#include <poll.h>
|
#include <poll.h>
|
||||||
#endif
|
#endif
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
@ -50,7 +50,7 @@
|
|||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#ifdef HAVE_DLFCN_H
|
#if HAVE_DLFCN_H
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -3709,7 +3709,7 @@ static enum CodecID opt_video_codec(const char *arg)
|
|||||||
|
|
||||||
/* simplistic plugin support */
|
/* simplistic plugin support */
|
||||||
|
|
||||||
#ifdef HAVE_DLOPEN
|
#if HAVE_DLOPEN
|
||||||
static void load_module(const char *filename)
|
static void load_module(const char *filename)
|
||||||
{
|
{
|
||||||
void *dll;
|
void *dll;
|
||||||
@ -4394,7 +4394,7 @@ static int parse_ffconfig(const char *filename)
|
|||||||
}
|
}
|
||||||
} else if (!strcasecmp(cmd, "LoadModule")) {
|
} else if (!strcasecmp(cmd, "LoadModule")) {
|
||||||
get_arg(arg, sizeof(arg), &p);
|
get_arg(arg, sizeof(arg), &p);
|
||||||
#ifdef HAVE_DLOPEN
|
#if HAVE_DLOPEN
|
||||||
load_module(arg);
|
load_module(arg);
|
||||||
#else
|
#else
|
||||||
fprintf(stderr, "%s:%d: Module support not compiled into this version: '%s'\n",
|
fprintf(stderr, "%s:%d: Module support not compiled into this version: '%s'\n",
|
||||||
|
@ -435,7 +435,7 @@ static av_cold int aac_decode_init(AVCodecContext * avccontext) {
|
|||||||
ac->sf_offset = 60;
|
ac->sf_offset = 60;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef CONFIG_HARDCODED_TABLES
|
#if !CONFIG_HARDCODED_TABLES
|
||||||
for (i = 0; i < 428; i++)
|
for (i = 0; i < 428; i++)
|
||||||
ff_aac_pow2sf_tab[i] = pow(2, (i - 200)/4.);
|
ff_aac_pow2sf_tab[i] = pow(2, (i - 200)/4.);
|
||||||
#endif /* CONFIG_HARDCODED_TABLES */
|
#endif /* CONFIG_HARDCODED_TABLES */
|
||||||
|
@ -899,7 +899,7 @@ const float * const ff_aac_codebook_vectors[] = {
|
|||||||
codebook_vector8, codebook_vector10,
|
codebook_vector8, codebook_vector10,
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_HARDCODED_TABLES
|
#if CONFIG_HARDCODED_TABLES
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Table of pow(2, (i - 200)/4.) used for different purposes depending on the
|
* Table of pow(2, (i - 200)/4.) used for different purposes depending on the
|
||||||
|
@ -65,7 +65,7 @@ extern const uint16_t ff_aac_spectral_sizes[11];
|
|||||||
|
|
||||||
extern const float *ff_aac_codebook_vectors[];
|
extern const float *ff_aac_codebook_vectors[];
|
||||||
|
|
||||||
#ifdef CONFIG_HARDCODED_TABLES
|
#if CONFIG_HARDCODED_TABLES
|
||||||
extern const float ff_aac_pow2sf_tab[316];
|
extern const float ff_aac_pow2sf_tab[316];
|
||||||
#else
|
#else
|
||||||
extern float ff_aac_pow2sf_tab[316];
|
extern float ff_aac_pow2sf_tab[316];
|
||||||
|
@ -153,7 +153,7 @@ typedef struct ADPCMContext {
|
|||||||
|
|
||||||
/* XXX: implement encoding */
|
/* XXX: implement encoding */
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#if CONFIG_ENCODERS
|
||||||
static int adpcm_encode_init(AVCodecContext *avctx)
|
static int adpcm_encode_init(AVCodecContext *avctx)
|
||||||
{
|
{
|
||||||
if (avctx->channels > 2)
|
if (avctx->channels > 2)
|
||||||
@ -1589,7 +1589,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx,
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#if CONFIG_ENCODERS
|
||||||
#define ADPCM_ENCODER(id,name,long_name_) \
|
#define ADPCM_ENCODER(id,name,long_name_) \
|
||||||
AVCodec name ## _encoder = { \
|
AVCodec name ## _encoder = { \
|
||||||
#name, \
|
#name, \
|
||||||
@ -1607,7 +1607,7 @@ AVCodec name ## _encoder = { \
|
|||||||
#define ADPCM_ENCODER(id,name,long_name_)
|
#define ADPCM_ENCODER(id,name,long_name_)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_DECODERS
|
#if CONFIG_DECODERS
|
||||||
#define ADPCM_DECODER(id,name,long_name_) \
|
#define ADPCM_DECODER(id,name,long_name_) \
|
||||||
AVCodec name ## _decoder = { \
|
AVCodec name ## _decoder = { \
|
||||||
#name, \
|
#name, \
|
||||||
|
@ -53,7 +53,7 @@ put_pixels_axp_asm:
|
|||||||
.frame sp, 0, ra
|
.frame sp, 0, ra
|
||||||
.prologue 0
|
.prologue 0
|
||||||
|
|
||||||
#ifdef CONFIG_GPROF
|
#if CONFIG_GPROF
|
||||||
lda AT, _mcount
|
lda AT, _mcount
|
||||||
jsr AT, (AT), _mcount
|
jsr AT, (AT), _mcount
|
||||||
#endif
|
#endif
|
||||||
@ -150,7 +150,7 @@ put_pixels_clamped_mvi_asm:
|
|||||||
.frame sp, 0, ra
|
.frame sp, 0, ra
|
||||||
.prologue 0
|
.prologue 0
|
||||||
|
|
||||||
#ifdef CONFIG_GPROF
|
#if CONFIG_GPROF
|
||||||
lda AT, _mcount
|
lda AT, _mcount
|
||||||
jsr AT, (AT), _mcount
|
jsr AT, (AT), _mcount
|
||||||
#endif
|
#endif
|
||||||
@ -205,7 +205,7 @@ add_pixels_clamped_mvi_asm:
|
|||||||
.frame sp, 0, ra
|
.frame sp, 0, ra
|
||||||
.prologue 0
|
.prologue 0
|
||||||
|
|
||||||
#ifdef CONFIG_GPROF
|
#if CONFIG_GPROF
|
||||||
lda AT, _mcount
|
lda AT, _mcount
|
||||||
jsr AT, (AT), _mcount
|
jsr AT, (AT), _mcount
|
||||||
#endif
|
#endif
|
||||||
|
@ -55,7 +55,7 @@ pix_abs16x16_mvi_asm:
|
|||||||
.frame sp, 0, ra, 0
|
.frame sp, 0, ra, 0
|
||||||
.prologue 0
|
.prologue 0
|
||||||
|
|
||||||
#ifdef CONFIG_GPROF
|
#if CONFIG_GPROF
|
||||||
lda AT, _mcount
|
lda AT, _mcount
|
||||||
jsr AT, (AT), _mcount
|
jsr AT, (AT), _mcount
|
||||||
#endif
|
#endif
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro movrel rd, val
|
.macro movrel rd, val
|
||||||
#if defined(HAVE_ARMV6T2) && !defined(CONFIG_SHARED)
|
#if HAVE_ARMV6T2 && !CONFIG_SHARED
|
||||||
movw \rd, #:lower16:\val
|
movw \rd, #:lower16:\val
|
||||||
movt \rd, #:upper16:\val
|
movt \rd, #:upper16:\val
|
||||||
#else
|
#else
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "libavcodec/dsputil.h"
|
#include "libavcodec/dsputil.h"
|
||||||
#ifdef HAVE_IPP
|
#if HAVE_IPP
|
||||||
#include <ipp.h>
|
#include <ipp.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -93,7 +93,7 @@ static void simple_idct_ARM_add(uint8_t *dest, int line_size, DCTELEM *block)
|
|||||||
ff_add_pixels_clamped(block, dest, line_size);
|
ff_add_pixels_clamped(block, dest, line_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_IPP
|
#if HAVE_IPP
|
||||||
static void simple_idct_ipp(DCTELEM *block)
|
static void simple_idct_ipp(DCTELEM *block)
|
||||||
{
|
{
|
||||||
ippiDCT8x8Inv_Video_16s_C1I(block);
|
ippiDCT8x8Inv_Video_16s_C1I(block);
|
||||||
@ -108,7 +108,7 @@ void add_pixels_clamped_iwmmxt(const DCTELEM *block, uint8_t *pixels, int line_s
|
|||||||
static void simple_idct_ipp_add(uint8_t *dest, int line_size, DCTELEM *block)
|
static void simple_idct_ipp_add(uint8_t *dest, int line_size, DCTELEM *block)
|
||||||
{
|
{
|
||||||
ippiDCT8x8Inv_Video_16s_C1I(block);
|
ippiDCT8x8Inv_Video_16s_C1I(block);
|
||||||
#ifdef HAVE_IWMMXT
|
#if HAVE_IWMMXT
|
||||||
add_pixels_clamped_iwmmxt(block, dest, line_size);
|
add_pixels_clamped_iwmmxt(block, dest, line_size);
|
||||||
#else
|
#else
|
||||||
ff_add_pixels_clamped_ARM(block, dest, line_size);
|
ff_add_pixels_clamped_ARM(block, dest, line_size);
|
||||||
@ -130,13 +130,13 @@ void dsputil_init_arm(DSPContext* c, AVCodecContext *avctx)
|
|||||||
|
|
||||||
if (avctx->lowres == 0) {
|
if (avctx->lowres == 0) {
|
||||||
if(idct_algo == FF_IDCT_AUTO){
|
if(idct_algo == FF_IDCT_AUTO){
|
||||||
#if defined(HAVE_IPP)
|
#if HAVE_IPP
|
||||||
idct_algo = FF_IDCT_IPP;
|
idct_algo = FF_IDCT_IPP;
|
||||||
#elif defined(HAVE_NEON)
|
#elif HAVE_NEON
|
||||||
idct_algo = FF_IDCT_SIMPLENEON;
|
idct_algo = FF_IDCT_SIMPLENEON;
|
||||||
#elif defined(HAVE_ARMV6)
|
#elif HAVE_ARMV6
|
||||||
idct_algo = FF_IDCT_SIMPLEARMV6;
|
idct_algo = FF_IDCT_SIMPLEARMV6;
|
||||||
#elif defined(HAVE_ARMV5TE)
|
#elif HAVE_ARMV5TE
|
||||||
idct_algo = FF_IDCT_SIMPLEARMV5TE;
|
idct_algo = FF_IDCT_SIMPLEARMV5TE;
|
||||||
#else
|
#else
|
||||||
idct_algo = FF_IDCT_ARM;
|
idct_algo = FF_IDCT_ARM;
|
||||||
@ -153,28 +153,28 @@ void dsputil_init_arm(DSPContext* c, AVCodecContext *avctx)
|
|||||||
c->idct_add= simple_idct_ARM_add;
|
c->idct_add= simple_idct_ARM_add;
|
||||||
c->idct = simple_idct_ARM;
|
c->idct = simple_idct_ARM;
|
||||||
c->idct_permutation_type= FF_NO_IDCT_PERM;
|
c->idct_permutation_type= FF_NO_IDCT_PERM;
|
||||||
#ifdef HAVE_ARMV6
|
#if HAVE_ARMV6
|
||||||
} else if (idct_algo==FF_IDCT_SIMPLEARMV6){
|
} else if (idct_algo==FF_IDCT_SIMPLEARMV6){
|
||||||
c->idct_put= ff_simple_idct_put_armv6;
|
c->idct_put= ff_simple_idct_put_armv6;
|
||||||
c->idct_add= ff_simple_idct_add_armv6;
|
c->idct_add= ff_simple_idct_add_armv6;
|
||||||
c->idct = ff_simple_idct_armv6;
|
c->idct = ff_simple_idct_armv6;
|
||||||
c->idct_permutation_type= FF_LIBMPEG2_IDCT_PERM;
|
c->idct_permutation_type= FF_LIBMPEG2_IDCT_PERM;
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_ARMV5TE
|
#if HAVE_ARMV5TE
|
||||||
} else if (idct_algo==FF_IDCT_SIMPLEARMV5TE){
|
} else if (idct_algo==FF_IDCT_SIMPLEARMV5TE){
|
||||||
c->idct_put= simple_idct_put_armv5te;
|
c->idct_put= simple_idct_put_armv5te;
|
||||||
c->idct_add= simple_idct_add_armv5te;
|
c->idct_add= simple_idct_add_armv5te;
|
||||||
c->idct = simple_idct_armv5te;
|
c->idct = simple_idct_armv5te;
|
||||||
c->idct_permutation_type = FF_NO_IDCT_PERM;
|
c->idct_permutation_type = FF_NO_IDCT_PERM;
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_IPP
|
#if HAVE_IPP
|
||||||
} else if (idct_algo==FF_IDCT_IPP){
|
} else if (idct_algo==FF_IDCT_IPP){
|
||||||
c->idct_put= simple_idct_ipp_put;
|
c->idct_put= simple_idct_ipp_put;
|
||||||
c->idct_add= simple_idct_ipp_add;
|
c->idct_add= simple_idct_ipp_add;
|
||||||
c->idct = simple_idct_ipp;
|
c->idct = simple_idct_ipp;
|
||||||
c->idct_permutation_type= FF_NO_IDCT_PERM;
|
c->idct_permutation_type= FF_NO_IDCT_PERM;
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_NEON
|
#if HAVE_NEON
|
||||||
} else if (idct_algo==FF_IDCT_SIMPLENEON){
|
} else if (idct_algo==FF_IDCT_SIMPLENEON){
|
||||||
c->idct_put= ff_simple_idct_put_neon;
|
c->idct_put= ff_simple_idct_put_neon;
|
||||||
c->idct_add= ff_simple_idct_add_neon;
|
c->idct_add= ff_simple_idct_add_neon;
|
||||||
@ -201,17 +201,17 @@ void dsputil_init_arm(DSPContext* c, AVCodecContext *avctx)
|
|||||||
c->put_no_rnd_pixels_tab[1][2] = put_no_rnd_pixels8_y2_arm;
|
c->put_no_rnd_pixels_tab[1][2] = put_no_rnd_pixels8_y2_arm;
|
||||||
c->put_no_rnd_pixels_tab[1][3] = put_no_rnd_pixels8_xy2_arm;
|
c->put_no_rnd_pixels_tab[1][3] = put_no_rnd_pixels8_xy2_arm;
|
||||||
|
|
||||||
#ifdef HAVE_ARMV5TE
|
#if HAVE_ARMV5TE
|
||||||
c->prefetch = ff_prefetch_arm;
|
c->prefetch = ff_prefetch_arm;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_IWMMXT
|
#if HAVE_IWMMXT
|
||||||
dsputil_init_iwmmxt(c, avctx);
|
dsputil_init_iwmmxt(c, avctx);
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_ARMVFP
|
#if HAVE_ARMVFP
|
||||||
ff_float_init_arm_vfp(c, avctx);
|
ff_float_init_arm_vfp(c, avctx);
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_NEON
|
#if HAVE_NEON
|
||||||
ff_dsputil_init_neon(c, avctx);
|
ff_dsputil_init_neon(c, avctx);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -24,12 +24,12 @@
|
|||||||
|
|
||||||
preserve8
|
preserve8
|
||||||
|
|
||||||
#ifndef HAVE_PLD
|
#if !HAVE_PLD
|
||||||
.macro pld reg
|
.macro pld reg
|
||||||
.endm
|
.endm
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_ARMV5TE
|
#if HAVE_ARMV5TE
|
||||||
function ff_prefetch_arm, export=1
|
function ff_prefetch_arm, export=1
|
||||||
subs r2, r2, #1
|
subs r2, r2, #1
|
||||||
pld [r0]
|
pld [r0]
|
||||||
|
@ -133,7 +133,7 @@ function ff_vector_fmul_reverse_vfp, export=1
|
|||||||
bx lr
|
bx lr
|
||||||
.endfunc
|
.endfunc
|
||||||
|
|
||||||
#ifdef HAVE_ARMV6
|
#if HAVE_ARMV6
|
||||||
/**
|
/**
|
||||||
* ARM VFP optimized float to int16 conversion.
|
* ARM VFP optimized float to int16 conversion.
|
||||||
* Assume that len is a positive number and is multiple of 8, destination
|
* Assume that len is a positive number and is multiple of 8, destination
|
||||||
|
@ -29,7 +29,7 @@ void ff_float_init_arm_vfp(DSPContext* c, AVCodecContext *avctx)
|
|||||||
{
|
{
|
||||||
c->vector_fmul = ff_vector_fmul_vfp;
|
c->vector_fmul = ff_vector_fmul_vfp;
|
||||||
c->vector_fmul_reverse = ff_vector_fmul_reverse_vfp;
|
c->vector_fmul_reverse = ff_vector_fmul_reverse_vfp;
|
||||||
#ifdef HAVE_ARMV6
|
#if HAVE_ARMV6
|
||||||
c->float_to_int16 = ff_float_to_int16_vfp;
|
c->float_to_int16 = ff_float_to_int16_vfp;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -38,7 +38,7 @@ static inline av_const int MULL(int a, int b, unsigned shift)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#define MULH MULH
|
#define MULH MULH
|
||||||
#ifdef HAVE_ARMV6
|
#if HAVE_ARMV6
|
||||||
static inline av_const int MULH(int a, int b)
|
static inline av_const int MULH(int a, int b)
|
||||||
{
|
{
|
||||||
int r;
|
int r;
|
||||||
@ -73,7 +73,7 @@ static inline av_const int64_t MAC64(int64_t d, int a, int b)
|
|||||||
#define MAC64(d, a, b) ((d) = MAC64(d, a, b))
|
#define MAC64(d, a, b) ((d) = MAC64(d, a, b))
|
||||||
#define MLS64(d, a, b) MAC64(d, -(a), b)
|
#define MLS64(d, a, b) MAC64(d, -(a), b)
|
||||||
|
|
||||||
#if defined(HAVE_ARMV5TE)
|
#if HAVE_ARMV5TE
|
||||||
|
|
||||||
/* signed 16x16 -> 32 multiply add accumulate */
|
/* signed 16x16 -> 32 multiply add accumulate */
|
||||||
# define MAC16(rt, ra, rb) \
|
# define MAC16(rt, ra, rb) \
|
||||||
|
@ -31,10 +31,10 @@ void MPV_common_init_arm(MpegEncContext *s)
|
|||||||
* allow optimized functions for armv5te unless
|
* allow optimized functions for armv5te unless
|
||||||
* a better iwmmxt function exists
|
* a better iwmmxt function exists
|
||||||
*/
|
*/
|
||||||
#ifdef HAVE_ARMV5TE
|
#if HAVE_ARMV5TE
|
||||||
MPV_common_init_armv5te(s);
|
MPV_common_init_armv5te(s);
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_IWMMXT
|
#if HAVE_IWMMXT
|
||||||
MPV_common_init_iwmmxt(s);
|
MPV_common_init_iwmmxt(s);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -465,7 +465,7 @@ for(i=0; i<s->avctx->extradata_size; i++){
|
|||||||
return (get_bits_count(&a->gb)+31)/32*4;
|
return (get_bits_count(&a->gb)+31)/32*4;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(CONFIG_ASV1_ENCODER) || defined(CONFIG_ASV2_ENCODER)
|
#if CONFIG_ASV1_ENCODER || CONFIG_ASV2_ENCODER
|
||||||
static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data){
|
static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data){
|
||||||
ASV1Context * const a = avctx->priv_data;
|
ASV1Context * const a = avctx->priv_data;
|
||||||
AVFrame *pict = data;
|
AVFrame *pict = data;
|
||||||
@ -519,7 +519,7 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size,
|
|||||||
|
|
||||||
return size*4;
|
return size*4;
|
||||||
}
|
}
|
||||||
#endif /* defined(CONFIG_ASV1_ENCODER) || defined(CONFIG_ASV2_ENCODER) */
|
#endif /* CONFIG_ASV1_ENCODER || CONFIG_ASV2_ENCODER */
|
||||||
|
|
||||||
static av_cold void common_init(AVCodecContext *avctx){
|
static av_cold void common_init(AVCodecContext *avctx){
|
||||||
ASV1Context * const a = avctx->priv_data;
|
ASV1Context * const a = avctx->priv_data;
|
||||||
@ -569,7 +569,7 @@ static av_cold int decode_init(AVCodecContext *avctx){
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(CONFIG_ASV1_ENCODER) || defined(CONFIG_ASV2_ENCODER)
|
#if CONFIG_ASV1_ENCODER || CONFIG_ASV2_ENCODER
|
||||||
static av_cold int encode_init(AVCodecContext *avctx){
|
static av_cold int encode_init(AVCodecContext *avctx){
|
||||||
ASV1Context * const a = avctx->priv_data;
|
ASV1Context * const a = avctx->priv_data;
|
||||||
int i;
|
int i;
|
||||||
@ -593,7 +593,7 @@ static av_cold int encode_init(AVCodecContext *avctx){
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif /* defined(CONFIG_ASV1_ENCODER) || defined(CONFIG_ASV2_ENCODER) */
|
#endif /* CONFIG_ASV1_ENCODER || CONFIG_ASV2_ENCODER */
|
||||||
|
|
||||||
static av_cold int decode_end(AVCodecContext *avctx){
|
static av_cold int decode_end(AVCodecContext *avctx){
|
||||||
ASV1Context * const a = avctx->priv_data;
|
ASV1Context * const a = avctx->priv_data;
|
||||||
@ -631,7 +631,7 @@ AVCodec asv2_decoder = {
|
|||||||
.long_name= NULL_IF_CONFIG_SMALL("ASUS V2"),
|
.long_name= NULL_IF_CONFIG_SMALL("ASUS V2"),
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_ASV1_ENCODER
|
#if CONFIG_ASV1_ENCODER
|
||||||
AVCodec asv1_encoder = {
|
AVCodec asv1_encoder = {
|
||||||
"asv1",
|
"asv1",
|
||||||
CODEC_TYPE_VIDEO,
|
CODEC_TYPE_VIDEO,
|
||||||
@ -645,7 +645,7 @@ AVCodec asv1_encoder = {
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_ASV2_ENCODER
|
#if CONFIG_ASV2_ENCODER
|
||||||
AVCodec asv2_encoder = {
|
AVCodec asv2_encoder = {
|
||||||
"asv2",
|
"asv2",
|
||||||
CODEC_TYPE_VIDEO,
|
CODEC_TYPE_VIDEO,
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
#ifndef AVCODEC_BFIN_MATHOPS_H
|
#ifndef AVCODEC_BFIN_MATHOPS_H
|
||||||
#define AVCODEC_BFIN_MATHOPS_H
|
#define AVCODEC_BFIN_MATHOPS_H
|
||||||
|
|
||||||
#ifdef CONFIG_MPEGAUDIO_HP
|
#if CONFIG_MPEGAUDIO_HP
|
||||||
#define MULH(X,Y) ({ int xxo; \
|
#define MULH(X,Y) ({ int xxo; \
|
||||||
__asm__ ( \
|
__asm__ ( \
|
||||||
"a1 = %2.L * %1.L (FU);\n\t" \
|
"a1 = %2.L * %1.L (FU);\n\t" \
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
//#define ALT_BITSTREAM_WRITER
|
//#define ALT_BITSTREAM_WRITER
|
||||||
//#define ALIGNED_BITSTREAM_WRITER
|
//#define ALIGNED_BITSTREAM_WRITER
|
||||||
#if !defined(LIBMPEG2_BITSTREAM_READER) && !defined(A32_BITSTREAM_READER) && !defined(ALT_BITSTREAM_READER)
|
#if !defined(LIBMPEG2_BITSTREAM_READER) && !defined(A32_BITSTREAM_READER) && !defined(ALT_BITSTREAM_READER)
|
||||||
# ifdef ARCH_ARM
|
# if ARCH_ARM
|
||||||
# define A32_BITSTREAM_READER
|
# define A32_BITSTREAM_READER
|
||||||
# else
|
# else
|
||||||
# define ALT_BITSTREAM_READER
|
# define ALT_BITSTREAM_READER
|
||||||
@ -52,7 +52,7 @@
|
|||||||
|
|
||||||
extern const uint8_t ff_reverse[256];
|
extern const uint8_t ff_reverse[256];
|
||||||
|
|
||||||
#if defined(ARCH_X86)
|
#if ARCH_X86
|
||||||
// avoid +32 for shift optimization (gcc should do that ...)
|
// avoid +32 for shift optimization (gcc should do that ...)
|
||||||
static inline int32_t NEG_SSR32( int32_t a, int8_t s){
|
static inline int32_t NEG_SSR32( int32_t a, int8_t s){
|
||||||
__asm__ ("sarl %1, %0\n\t"
|
__asm__ ("sarl %1, %0\n\t"
|
||||||
@ -196,7 +196,7 @@ static inline void put_bits(PutBitContext *s, int n, unsigned int value)
|
|||||||
#ifdef BITSTREAM_WRITER_LE
|
#ifdef BITSTREAM_WRITER_LE
|
||||||
bit_buf |= value << (32 - bit_left);
|
bit_buf |= value << (32 - bit_left);
|
||||||
if (n >= bit_left) {
|
if (n >= bit_left) {
|
||||||
#ifndef HAVE_FAST_UNALIGNED
|
#if !HAVE_FAST_UNALIGNED
|
||||||
if (3 & (intptr_t) s->buf_ptr) {
|
if (3 & (intptr_t) s->buf_ptr) {
|
||||||
s->buf_ptr[0] = bit_buf ;
|
s->buf_ptr[0] = bit_buf ;
|
||||||
s->buf_ptr[1] = bit_buf >> 8;
|
s->buf_ptr[1] = bit_buf >> 8;
|
||||||
@ -217,7 +217,7 @@ static inline void put_bits(PutBitContext *s, int n, unsigned int value)
|
|||||||
} else {
|
} else {
|
||||||
bit_buf<<=bit_left;
|
bit_buf<<=bit_left;
|
||||||
bit_buf |= value >> (n - bit_left);
|
bit_buf |= value >> (n - bit_left);
|
||||||
#ifndef HAVE_FAST_UNALIGNED
|
#if !HAVE_FAST_UNALIGNED
|
||||||
if (3 & (intptr_t) s->buf_ptr) {
|
if (3 & (intptr_t) s->buf_ptr) {
|
||||||
s->buf_ptr[0] = bit_buf >> 24;
|
s->buf_ptr[0] = bit_buf >> 24;
|
||||||
s->buf_ptr[1] = bit_buf >> 16;
|
s->buf_ptr[1] = bit_buf >> 16;
|
||||||
@ -243,7 +243,7 @@ static inline void put_bits(PutBitContext *s, int n, unsigned int value)
|
|||||||
static inline void put_bits(PutBitContext *s, int n, unsigned int value)
|
static inline void put_bits(PutBitContext *s, int n, unsigned int value)
|
||||||
{
|
{
|
||||||
# ifdef ALIGNED_BITSTREAM_WRITER
|
# ifdef ALIGNED_BITSTREAM_WRITER
|
||||||
# if defined(ARCH_X86)
|
# if ARCH_X86
|
||||||
__asm__ volatile(
|
__asm__ volatile(
|
||||||
"movl %0, %%ecx \n\t"
|
"movl %0, %%ecx \n\t"
|
||||||
"xorl %%eax, %%eax \n\t"
|
"xorl %%eax, %%eax \n\t"
|
||||||
@ -274,7 +274,7 @@ static inline void put_bits(PutBitContext *s, int n, unsigned int value)
|
|||||||
s->index= index;
|
s->index= index;
|
||||||
# endif
|
# endif
|
||||||
# else //ALIGNED_BITSTREAM_WRITER
|
# else //ALIGNED_BITSTREAM_WRITER
|
||||||
# if defined(ARCH_X86)
|
# if ARCH_X86
|
||||||
__asm__ volatile(
|
__asm__ volatile(
|
||||||
"movl $7, %%ecx \n\t"
|
"movl $7, %%ecx \n\t"
|
||||||
"andl %0, %%ecx \n\t"
|
"andl %0, %%ecx \n\t"
|
||||||
@ -550,7 +550,7 @@ static inline void skip_bits_long(GetBitContext *s, int n){
|
|||||||
name##_bit_count-= 32;\
|
name##_bit_count-= 32;\
|
||||||
}\
|
}\
|
||||||
|
|
||||||
#if defined(ARCH_X86)
|
#if ARCH_X86
|
||||||
# define SKIP_CACHE(name, gb, num)\
|
# define SKIP_CACHE(name, gb, num)\
|
||||||
__asm__(\
|
__asm__(\
|
||||||
"shldl %2, %1, %0 \n\t"\
|
"shldl %2, %1, %0 \n\t"\
|
||||||
|
@ -270,7 +270,7 @@ static void refill(CABACContext *c){
|
|||||||
c->bytestream+= CABAC_BITS/8;
|
c->bytestream+= CABAC_BITS/8;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if ! ( defined(ARCH_X86) && defined(HAVE_7REGS) && defined(HAVE_EBX_AVAILABLE) && !defined(BROKEN_RELOCATIONS) )
|
#if ! ( ARCH_X86 && HAVE_7REGS && HAVE_EBX_AVAILABLE && !defined(BROKEN_RELOCATIONS) )
|
||||||
static void refill2(CABACContext *c){
|
static void refill2(CABACContext *c){
|
||||||
int i, x;
|
int i, x;
|
||||||
|
|
||||||
@ -372,7 +372,7 @@ static av_always_inline int get_cabac_inline(CABACContext *c, uint8_t * const st
|
|||||||
//FIXME gcc generates duplicate load/stores for c->low and c->range
|
//FIXME gcc generates duplicate load/stores for c->low and c->range
|
||||||
#define LOW "0"
|
#define LOW "0"
|
||||||
#define RANGE "4"
|
#define RANGE "4"
|
||||||
#ifdef ARCH_X86_64
|
#if ARCH_X86_64
|
||||||
#define BYTESTART "16"
|
#define BYTESTART "16"
|
||||||
#define BYTE "24"
|
#define BYTE "24"
|
||||||
#define BYTEEND "32"
|
#define BYTEEND "32"
|
||||||
@ -381,7 +381,7 @@ static av_always_inline int get_cabac_inline(CABACContext *c, uint8_t * const st
|
|||||||
#define BYTE "16"
|
#define BYTE "16"
|
||||||
#define BYTEEND "20"
|
#define BYTEEND "20"
|
||||||
#endif
|
#endif
|
||||||
#if defined(ARCH_X86) && defined(HAVE_7REGS) && defined(HAVE_EBX_AVAILABLE) && !defined(BROKEN_RELOCATIONS)
|
#if ARCH_X86 && HAVE_7REGS && HAVE_EBX_AVAILABLE && !defined(BROKEN_RELOCATIONS)
|
||||||
int bit;
|
int bit;
|
||||||
|
|
||||||
#ifndef BRANCHLESS_CABAC_DECODER
|
#ifndef BRANCHLESS_CABAC_DECODER
|
||||||
@ -467,7 +467,7 @@ static av_always_inline int get_cabac_inline(CABACContext *c, uint8_t * const st
|
|||||||
#else /* BRANCHLESS_CABAC_DECODER */
|
#else /* BRANCHLESS_CABAC_DECODER */
|
||||||
|
|
||||||
|
|
||||||
#if defined HAVE_FAST_CMOV
|
#if HAVE_FAST_CMOV
|
||||||
#define BRANCHLESS_GET_CABAC_UPDATE(ret, cabac, statep, low, lowword, range, tmp, tmpbyte)\
|
#define BRANCHLESS_GET_CABAC_UPDATE(ret, cabac, statep, low, lowword, range, tmp, tmpbyte)\
|
||||||
"mov "tmp" , %%ecx \n\t"\
|
"mov "tmp" , %%ecx \n\t"\
|
||||||
"shl $17 , "tmp" \n\t"\
|
"shl $17 , "tmp" \n\t"\
|
||||||
@ -537,7 +537,7 @@ static av_always_inline int get_cabac_inline(CABACContext *c, uint8_t * const st
|
|||||||
);
|
);
|
||||||
bit&=1;
|
bit&=1;
|
||||||
#endif /* BRANCHLESS_CABAC_DECODER */
|
#endif /* BRANCHLESS_CABAC_DECODER */
|
||||||
#else /* defined(ARCH_X86) && defined(HAVE_7REGS) && defined(HAVE_EBX_AVAILABLE) && !defined(BROKEN_RELOCATIONS) */
|
#else /* ARCH_X86 && HAVE_7REGS && HAVE_EBX_AVAILABLE && !defined(BROKEN_RELOCATIONS) */
|
||||||
int s = *state;
|
int s = *state;
|
||||||
int RangeLPS= ff_h264_lps_range[2*(c->range&0xC0) + s];
|
int RangeLPS= ff_h264_lps_range[2*(c->range&0xC0) + s];
|
||||||
int bit, lps_mask av_unused;
|
int bit, lps_mask av_unused;
|
||||||
@ -576,7 +576,7 @@ static av_always_inline int get_cabac_inline(CABACContext *c, uint8_t * const st
|
|||||||
if(!(c->low & CABAC_MASK))
|
if(!(c->low & CABAC_MASK))
|
||||||
refill2(c);
|
refill2(c);
|
||||||
#endif /* BRANCHLESS_CABAC_DECODER */
|
#endif /* BRANCHLESS_CABAC_DECODER */
|
||||||
#endif /* defined(ARCH_X86) && defined(HAVE_7REGS) && defined(HAVE_EBX_AVAILABLE) && !defined(BROKEN_RELOCATIONS) */
|
#endif /* ARCH_X86 && HAVE_7REGS && HAVE_EBX_AVAILABLE && !defined(BROKEN_RELOCATIONS) */
|
||||||
return bit;
|
return bit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -637,7 +637,7 @@ static int av_unused get_cabac_bypass(CABACContext *c){
|
|||||||
|
|
||||||
|
|
||||||
static av_always_inline int get_cabac_bypass_sign(CABACContext *c, int val){
|
static av_always_inline int get_cabac_bypass_sign(CABACContext *c, int val){
|
||||||
#if defined(ARCH_X86) && !(defined(PIC) && defined(__GNUC__))
|
#if ARCH_X86 && !(defined(PIC) && defined(__GNUC__))
|
||||||
__asm__ volatile(
|
__asm__ volatile(
|
||||||
"movl "RANGE "(%1), %%ebx \n\t"
|
"movl "RANGE "(%1), %%ebx \n\t"
|
||||||
"movl "LOW "(%1), %%eax \n\t"
|
"movl "LOW "(%1), %%eax \n\t"
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
|
|
||||||
/* Disable the encoder. */
|
/* Disable the encoder. */
|
||||||
#undef CONFIG_CLJR_ENCODER
|
#undef CONFIG_CLJR_ENCODER
|
||||||
|
#define CONFIG_CLJR_ENCODER 0
|
||||||
|
|
||||||
typedef struct CLJRContext{
|
typedef struct CLJRContext{
|
||||||
AVCodecContext *avctx;
|
AVCodecContext *avctx;
|
||||||
@ -84,7 +85,7 @@ static int decode_frame(AVCodecContext *avctx,
|
|||||||
return buf_size;
|
return buf_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_CLJR_ENCODER
|
#if CONFIG_CLJR_ENCODER
|
||||||
static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data){
|
static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data){
|
||||||
CLJRContext * const a = avctx->priv_data;
|
CLJRContext * const a = avctx->priv_data;
|
||||||
AVFrame *pict = data;
|
AVFrame *pict = data;
|
||||||
@ -124,7 +125,7 @@ static av_cold int decode_init(AVCodecContext *avctx){
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_CLJR_ENCODER
|
#if CONFIG_CLJR_ENCODER
|
||||||
static av_cold int encode_init(AVCodecContext *avctx){
|
static av_cold int encode_init(AVCodecContext *avctx){
|
||||||
|
|
||||||
common_init(avctx);
|
common_init(avctx);
|
||||||
@ -146,7 +147,7 @@ AVCodec cljr_decoder = {
|
|||||||
.long_name = NULL_IF_CONFIG_SMALL("Cirrus Logic AccuPak"),
|
.long_name = NULL_IF_CONFIG_SMALL("Cirrus Logic AccuPak"),
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_CLJR_ENCODER
|
#if CONFIG_CLJR_ENCODER
|
||||||
AVCodec cljr_encoder = {
|
AVCodec cljr_encoder = {
|
||||||
"cljr",
|
"cljr",
|
||||||
CODEC_TYPE_VIDEO,
|
CODEC_TYPE_VIDEO,
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
#include "avcodec.h"
|
#include "avcodec.h"
|
||||||
|
|
||||||
#ifdef CONFIG_ZLIB
|
#if CONFIG_ZLIB
|
||||||
#include <zlib.h>
|
#include <zlib.h>
|
||||||
#endif
|
#endif
|
||||||
#include "libavutil/lzo.h"
|
#include "libavutil/lzo.h"
|
||||||
@ -163,7 +163,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 1: { // zlib compression
|
case 1: { // zlib compression
|
||||||
#ifdef CONFIG_ZLIB
|
#if CONFIG_ZLIB
|
||||||
unsigned long dlen = c->decomp_size;
|
unsigned long dlen = c->decomp_size;
|
||||||
if (uncompress(c->decomp_buf, &dlen, &buf[2], buf_size - 2) != Z_OK)
|
if (uncompress(c->decomp_buf, &dlen, &buf[2], buf_size - 2) != Z_OK)
|
||||||
av_log(avctx, AV_LOG_ERROR, "error during zlib decompression\n");
|
av_log(avctx, AV_LOG_ERROR, "error during zlib decompression\n");
|
||||||
|
@ -97,14 +97,14 @@ struct algo algos[] = {
|
|||||||
{"INT", 1, j_rev_dct, idct, MMX_PERM},
|
{"INT", 1, j_rev_dct, idct, MMX_PERM},
|
||||||
{"SIMPLE-C", 1, ff_simple_idct, idct, NO_PERM},
|
{"SIMPLE-C", 1, ff_simple_idct, idct, NO_PERM},
|
||||||
|
|
||||||
#ifdef HAVE_MMX
|
#if HAVE_MMX
|
||||||
{"MMX", 0, ff_fdct_mmx, fdct, NO_PERM, FF_MM_MMX},
|
{"MMX", 0, ff_fdct_mmx, fdct, NO_PERM, FF_MM_MMX},
|
||||||
#ifdef HAVE_MMX2
|
#if HAVE_MMX2
|
||||||
{"MMX2", 0, ff_fdct_mmx2, fdct, NO_PERM, FF_MM_MMXEXT},
|
{"MMX2", 0, ff_fdct_mmx2, fdct, NO_PERM, FF_MM_MMXEXT},
|
||||||
{"SSE2", 0, ff_fdct_sse2, fdct, NO_PERM, FF_MM_SSE2},
|
{"SSE2", 0, ff_fdct_sse2, fdct, NO_PERM, FF_MM_SSE2},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_GPL
|
#if CONFIG_GPL
|
||||||
{"LIBMPEG2-MMX", 1, ff_mmx_idct, idct, MMX_PERM, FF_MM_MMX},
|
{"LIBMPEG2-MMX", 1, ff_mmx_idct, idct, MMX_PERM, FF_MM_MMX},
|
||||||
{"LIBMPEG2-MMXEXT", 1, ff_mmxext_idct, idct, MMX_PERM, FF_MM_MMXEXT},
|
{"LIBMPEG2-MMXEXT", 1, ff_mmxext_idct, idct, MMX_PERM, FF_MM_MMXEXT},
|
||||||
#endif
|
#endif
|
||||||
@ -114,25 +114,25 @@ struct algo algos[] = {
|
|||||||
{"XVID-SSE2", 1, ff_idct_xvid_sse2, idct, SSE2_PERM, FF_MM_SSE2},
|
{"XVID-SSE2", 1, ff_idct_xvid_sse2, idct, SSE2_PERM, FF_MM_SSE2},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_ALTIVEC
|
#if HAVE_ALTIVEC
|
||||||
{"altivecfdct", 0, fdct_altivec, fdct, NO_PERM, FF_MM_ALTIVEC},
|
{"altivecfdct", 0, fdct_altivec, fdct, NO_PERM, FF_MM_ALTIVEC},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ARCH_BFIN
|
#if ARCH_BFIN
|
||||||
{"BFINfdct", 0, ff_bfin_fdct, fdct, NO_PERM},
|
{"BFINfdct", 0, ff_bfin_fdct, fdct, NO_PERM},
|
||||||
{"BFINidct", 1, ff_bfin_idct, idct, NO_PERM},
|
{"BFINidct", 1, ff_bfin_idct, idct, NO_PERM},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ARCH_ARM
|
#if ARCH_ARM
|
||||||
{"SIMPLE-ARM", 1, simple_idct_ARM, idct, NO_PERM },
|
{"SIMPLE-ARM", 1, simple_idct_ARM, idct, NO_PERM },
|
||||||
{"INT-ARM", 1, j_rev_dct_ARM, idct, MMX_PERM },
|
{"INT-ARM", 1, j_rev_dct_ARM, idct, MMX_PERM },
|
||||||
#ifdef HAVE_ARMV5TE
|
#if HAVE_ARMV5TE
|
||||||
{"SIMPLE-ARMV5TE", 1, simple_idct_armv5te, idct, NO_PERM },
|
{"SIMPLE-ARMV5TE", 1, simple_idct_armv5te, idct, NO_PERM },
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_ARMV6
|
#if HAVE_ARMV6
|
||||||
{"SIMPLE-ARMV6", 1, ff_simple_idct_armv6, idct, MMX_PERM },
|
{"SIMPLE-ARMV6", 1, ff_simple_idct_armv6, idct, MMX_PERM },
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_NEON
|
#if HAVE_NEON
|
||||||
{"SIMPLE-NEON", 1, ff_simple_idct_neon, idct, PARTTRANS_PERM },
|
{"SIMPLE-NEON", 1, ff_simple_idct_neon, idct, PARTTRANS_PERM },
|
||||||
#endif
|
#endif
|
||||||
#endif /* ARCH_ARM */
|
#endif /* ARCH_ARM */
|
||||||
@ -186,7 +186,7 @@ static DCTELEM block_org[64] __attribute__ ((aligned (8)));
|
|||||||
|
|
||||||
static inline void mmx_emms(void)
|
static inline void mmx_emms(void)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_MMX
|
#if HAVE_MMX
|
||||||
if (cpu_flags & FF_MM_MMX)
|
if (cpu_flags & FF_MM_MMX)
|
||||||
__asm__ volatile ("emms\n\t");
|
__asm__ volatile ("emms\n\t");
|
||||||
#endif
|
#endif
|
||||||
|
@ -177,7 +177,7 @@ static int dnxhd_encode_init(AVCodecContext *avctx)
|
|||||||
|
|
||||||
dsputil_init(&ctx->m.dsp, avctx);
|
dsputil_init(&ctx->m.dsp, avctx);
|
||||||
ff_dct_common_init(&ctx->m);
|
ff_dct_common_init(&ctx->m);
|
||||||
#ifdef HAVE_MMX
|
#if HAVE_MMX
|
||||||
ff_dnxhd_init_mmx(ctx);
|
ff_dnxhd_init_mmx(ctx);
|
||||||
#endif
|
#endif
|
||||||
if (!ctx->m.dct_quantize)
|
if (!ctx->m.dct_quantize)
|
||||||
|
@ -169,7 +169,7 @@ void ff_init_scantable(uint8_t *permutation, ScanTable *st, const uint8_t *src_s
|
|||||||
int j;
|
int j;
|
||||||
j = src_scantable[i];
|
j = src_scantable[i];
|
||||||
st->permutated[i] = permutation[j];
|
st->permutated[i] = permutation[j];
|
||||||
#ifdef ARCH_PPC
|
#if ARCH_PPC
|
||||||
st->inverse[j] = i;
|
st->inverse[j] = i;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -340,7 +340,7 @@ static int sse16_c(void *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef CONFIG_SNOW_ENCODER //dwt is in snow.c
|
#if CONFIG_SNOW_ENCODER //dwt is in snow.c
|
||||||
static inline int w_c(void *v, uint8_t * pix1, uint8_t * pix2, int line_size, int w, int h, int type){
|
static inline int w_c(void *v, uint8_t * pix1, uint8_t * pix2, int line_size, int w, int h, int type){
|
||||||
int s, i, j;
|
int s, i, j;
|
||||||
const int dec_count= w==8 ? 3 : 4;
|
const int dec_count= w==8 ? 3 : 4;
|
||||||
@ -2711,7 +2711,7 @@ static void wmv2_mspel8_h_lowpass(uint8_t *dst, uint8_t *src, int dstStride, int
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_CAVS_DECODER
|
#if CONFIG_CAVS_DECODER
|
||||||
/* AVS specific */
|
/* AVS specific */
|
||||||
void ff_cavsdsp_init(DSPContext* c, AVCodecContext *avctx);
|
void ff_cavsdsp_init(DSPContext* c, AVCodecContext *avctx);
|
||||||
|
|
||||||
@ -2729,7 +2729,7 @@ void ff_avg_cavs_qpel16_mc00_c(uint8_t *dst, uint8_t *src, int stride) {
|
|||||||
}
|
}
|
||||||
#endif /* CONFIG_CAVS_DECODER */
|
#endif /* CONFIG_CAVS_DECODER */
|
||||||
|
|
||||||
#if defined(CONFIG_VC1_DECODER) || defined(CONFIG_WMV3_DECODER)
|
#if CONFIG_VC1_DECODER || CONFIG_WMV3_DECODER
|
||||||
/* VC-1 specific */
|
/* VC-1 specific */
|
||||||
void ff_vc1dsp_init(DSPContext* c, AVCodecContext *avctx);
|
void ff_vc1dsp_init(DSPContext* c, AVCodecContext *avctx);
|
||||||
|
|
||||||
@ -2743,11 +2743,11 @@ void ff_intrax8dsp_init(DSPContext* c, AVCodecContext *avctx);
|
|||||||
/* H264 specific */
|
/* H264 specific */
|
||||||
void ff_h264dspenc_init(DSPContext* c, AVCodecContext *avctx);
|
void ff_h264dspenc_init(DSPContext* c, AVCodecContext *avctx);
|
||||||
|
|
||||||
#if defined(CONFIG_RV30_DECODER)
|
#if CONFIG_RV30_DECODER
|
||||||
void ff_rv30dsp_init(DSPContext* c, AVCodecContext *avctx);
|
void ff_rv30dsp_init(DSPContext* c, AVCodecContext *avctx);
|
||||||
#endif /* CONFIG_RV30_DECODER */
|
#endif /* CONFIG_RV30_DECODER */
|
||||||
|
|
||||||
#if defined(CONFIG_RV40_DECODER)
|
#if CONFIG_RV40_DECODER
|
||||||
static void put_rv40_qpel16_mc33_c(uint8_t *dst, uint8_t *src, int stride){
|
static void put_rv40_qpel16_mc33_c(uint8_t *dst, uint8_t *src, int stride){
|
||||||
put_pixels16_xy2_c(dst, src, stride, 16);
|
put_pixels16_xy2_c(dst, src, stride, 16);
|
||||||
}
|
}
|
||||||
@ -3467,7 +3467,7 @@ void ff_set_cmp(DSPContext* c, me_cmp_func *cmp, int type){
|
|||||||
case FF_CMP_NSSE:
|
case FF_CMP_NSSE:
|
||||||
cmp[i]= c->nsse[i];
|
cmp[i]= c->nsse[i];
|
||||||
break;
|
break;
|
||||||
#ifdef CONFIG_SNOW_ENCODER
|
#if CONFIG_SNOW_ENCODER
|
||||||
case FF_CMP_W53:
|
case FF_CMP_W53:
|
||||||
cmp[i]= c->w53[i];
|
cmp[i]= c->w53[i];
|
||||||
break;
|
break;
|
||||||
@ -3518,7 +3518,7 @@ static void add_bytes_l2_c(uint8_t *dst, uint8_t *src1, uint8_t *src2, int w){
|
|||||||
|
|
||||||
static void diff_bytes_c(uint8_t *dst, uint8_t *src1, uint8_t *src2, int w){
|
static void diff_bytes_c(uint8_t *dst, uint8_t *src1, uint8_t *src2, int w){
|
||||||
long i;
|
long i;
|
||||||
#ifndef HAVE_FAST_UNALIGNED
|
#if !HAVE_FAST_UNALIGNED
|
||||||
if((long)src2 & (sizeof(long)-1)){
|
if((long)src2 & (sizeof(long)-1)){
|
||||||
for(i=0; i+7<w; i+=8){
|
for(i=0; i+7<w; i+=8){
|
||||||
dst[i+0] = src1[i+0]-src2[i+0];
|
dst[i+0] = src1[i+0]-src2[i+0];
|
||||||
@ -3686,7 +3686,7 @@ static int dct_sad8x8_c(/*MpegEncContext*/ void *c, uint8_t *src1, uint8_t *src2
|
|||||||
return s->dsp.sum_abs_dctelem(temp);
|
return s->dsp.sum_abs_dctelem(temp);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_GPL
|
#if CONFIG_GPL
|
||||||
#define DCT8_1D {\
|
#define DCT8_1D {\
|
||||||
const int s07 = SRC(0) + SRC(7);\
|
const int s07 = SRC(0) + SRC(7);\
|
||||||
const int s16 = SRC(1) + SRC(6);\
|
const int s16 = SRC(1) + SRC(6);\
|
||||||
@ -3992,7 +3992,7 @@ static int ssd_int8_vs_int16_c(const int8_t *pix1, const int16_t *pix2,
|
|||||||
WRAPPER8_16_SQ(hadamard8_diff8x8_c, hadamard8_diff16_c)
|
WRAPPER8_16_SQ(hadamard8_diff8x8_c, hadamard8_diff16_c)
|
||||||
WRAPPER8_16_SQ(hadamard8_intra8x8_c, hadamard8_intra16_c)
|
WRAPPER8_16_SQ(hadamard8_intra8x8_c, hadamard8_intra16_c)
|
||||||
WRAPPER8_16_SQ(dct_sad8x8_c, dct_sad16_c)
|
WRAPPER8_16_SQ(dct_sad8x8_c, dct_sad16_c)
|
||||||
#ifdef CONFIG_GPL
|
#if CONFIG_GPL
|
||||||
WRAPPER8_16_SQ(dct264_sad8x8_c, dct264_sad16_c)
|
WRAPPER8_16_SQ(dct264_sad8x8_c, dct264_sad16_c)
|
||||||
#endif
|
#endif
|
||||||
WRAPPER8_16_SQ(dct_max8x8_c, dct_max16_c)
|
WRAPPER8_16_SQ(dct_max8x8_c, dct_max16_c)
|
||||||
@ -4249,7 +4249,7 @@ int ff_check_alignment(void){
|
|||||||
|
|
||||||
if((long)&aligned & 15){
|
if((long)&aligned & 15){
|
||||||
if(!did_fail){
|
if(!did_fail){
|
||||||
#if defined(HAVE_MMX) || defined(HAVE_ALTIVEC)
|
#if HAVE_MMX || HAVE_ALTIVEC
|
||||||
av_log(NULL, AV_LOG_ERROR,
|
av_log(NULL, AV_LOG_ERROR,
|
||||||
"Compiler did not align stack variables. Libavcodec has been miscompiled\n"
|
"Compiler did not align stack variables. Libavcodec has been miscompiled\n"
|
||||||
"and may be very slow or crash. This is not a bug in libavcodec,\n"
|
"and may be very slow or crash. This is not a bug in libavcodec,\n"
|
||||||
@ -4269,7 +4269,7 @@ void dsputil_init(DSPContext* c, AVCodecContext *avctx)
|
|||||||
|
|
||||||
ff_check_alignment();
|
ff_check_alignment();
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#if CONFIG_ENCODERS
|
||||||
if(avctx->dct_algo==FF_DCT_FASTINT) {
|
if(avctx->dct_algo==FF_DCT_FASTINT) {
|
||||||
c->fdct = fdct_ifast;
|
c->fdct = fdct_ifast;
|
||||||
c->fdct248 = fdct_ifast248;
|
c->fdct248 = fdct_ifast248;
|
||||||
@ -4487,22 +4487,22 @@ void dsputil_init(DSPContext* c, AVCodecContext *avctx)
|
|||||||
|
|
||||||
c->draw_edges = draw_edges_c;
|
c->draw_edges = draw_edges_c;
|
||||||
|
|
||||||
#ifdef CONFIG_CAVS_DECODER
|
#if CONFIG_CAVS_DECODER
|
||||||
ff_cavsdsp_init(c,avctx);
|
ff_cavsdsp_init(c,avctx);
|
||||||
#endif
|
#endif
|
||||||
#if defined(CONFIG_VC1_DECODER) || defined(CONFIG_WMV3_DECODER)
|
#if CONFIG_VC1_DECODER || CONFIG_WMV3_DECODER
|
||||||
ff_vc1dsp_init(c,avctx);
|
ff_vc1dsp_init(c,avctx);
|
||||||
#endif
|
#endif
|
||||||
#if defined(CONFIG_WMV2_DECODER) || defined(CONFIG_VC1_DECODER) || defined(CONFIG_WMV3_DECODER)
|
#if CONFIG_WMV2_DECODER || CONFIG_VC1_DECODER || CONFIG_WMV3_DECODER
|
||||||
ff_intrax8dsp_init(c,avctx);
|
ff_intrax8dsp_init(c,avctx);
|
||||||
#endif
|
#endif
|
||||||
#if defined(CONFIG_H264_ENCODER)
|
#if CONFIG_H264_ENCODER
|
||||||
ff_h264dspenc_init(c,avctx);
|
ff_h264dspenc_init(c,avctx);
|
||||||
#endif
|
#endif
|
||||||
#if defined(CONFIG_RV30_DECODER)
|
#if CONFIG_RV30_DECODER
|
||||||
ff_rv30dsp_init(c,avctx);
|
ff_rv30dsp_init(c,avctx);
|
||||||
#endif
|
#endif
|
||||||
#if defined(CONFIG_RV40_DECODER)
|
#if CONFIG_RV40_DECODER
|
||||||
ff_rv40dsp_init(c,avctx);
|
ff_rv40dsp_init(c,avctx);
|
||||||
c->put_rv40_qpel_pixels_tab[0][15] = put_rv40_qpel16_mc33_c;
|
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->avg_rv40_qpel_pixels_tab[0][15] = avg_rv40_qpel16_mc33_c;
|
||||||
@ -4527,7 +4527,7 @@ void dsputil_init(DSPContext* c, AVCodecContext *avctx)
|
|||||||
c->hadamard8_diff[4]= hadamard8_intra16_c;
|
c->hadamard8_diff[4]= hadamard8_intra16_c;
|
||||||
SET_CMP_FUNC(dct_sad)
|
SET_CMP_FUNC(dct_sad)
|
||||||
SET_CMP_FUNC(dct_max)
|
SET_CMP_FUNC(dct_max)
|
||||||
#ifdef CONFIG_GPL
|
#if CONFIG_GPL
|
||||||
SET_CMP_FUNC(dct264_sad)
|
SET_CMP_FUNC(dct264_sad)
|
||||||
#endif
|
#endif
|
||||||
c->sad[0]= pix_abs16_c;
|
c->sad[0]= pix_abs16_c;
|
||||||
@ -4544,7 +4544,7 @@ void dsputil_init(DSPContext* c, AVCodecContext *avctx)
|
|||||||
c->vsse[4]= vsse_intra16_c;
|
c->vsse[4]= vsse_intra16_c;
|
||||||
c->nsse[0]= nsse16_c;
|
c->nsse[0]= nsse16_c;
|
||||||
c->nsse[1]= nsse8_c;
|
c->nsse[1]= nsse8_c;
|
||||||
#ifdef CONFIG_SNOW_ENCODER
|
#if CONFIG_SNOW_ENCODER
|
||||||
c->w53[0]= w53_16_c;
|
c->w53[0]= w53_16_c;
|
||||||
c->w53[1]= w53_8_c;
|
c->w53[1]= w53_8_c;
|
||||||
c->w97[0]= w97_16_c;
|
c->w97[0]= w97_16_c;
|
||||||
@ -4558,7 +4558,7 @@ void dsputil_init(DSPContext* c, AVCodecContext *avctx)
|
|||||||
c->diff_bytes= diff_bytes_c;
|
c->diff_bytes= diff_bytes_c;
|
||||||
c->sub_hfyu_median_prediction= sub_hfyu_median_prediction_c;
|
c->sub_hfyu_median_prediction= sub_hfyu_median_prediction_c;
|
||||||
c->bswap_buf= bswap_buf;
|
c->bswap_buf= bswap_buf;
|
||||||
#ifdef CONFIG_PNG_DECODER
|
#if CONFIG_PNG_DECODER
|
||||||
c->add_png_paeth_prediction= ff_add_png_paeth_prediction;
|
c->add_png_paeth_prediction= ff_add_png_paeth_prediction;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -4587,19 +4587,19 @@ void dsputil_init(DSPContext* c, AVCodecContext *avctx)
|
|||||||
c->try_8x8basis= try_8x8basis_c;
|
c->try_8x8basis= try_8x8basis_c;
|
||||||
c->add_8x8basis= add_8x8basis_c;
|
c->add_8x8basis= add_8x8basis_c;
|
||||||
|
|
||||||
#ifdef CONFIG_SNOW_DECODER
|
#if CONFIG_SNOW_DECODER
|
||||||
c->vertical_compose97i = ff_snow_vertical_compose97i;
|
c->vertical_compose97i = ff_snow_vertical_compose97i;
|
||||||
c->horizontal_compose97i = ff_snow_horizontal_compose97i;
|
c->horizontal_compose97i = ff_snow_horizontal_compose97i;
|
||||||
c->inner_add_yblock = ff_snow_inner_add_yblock;
|
c->inner_add_yblock = ff_snow_inner_add_yblock;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_VORBIS_DECODER
|
#if CONFIG_VORBIS_DECODER
|
||||||
c->vorbis_inverse_coupling = vorbis_inverse_coupling;
|
c->vorbis_inverse_coupling = vorbis_inverse_coupling;
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_AC3_DECODER
|
#if CONFIG_AC3_DECODER
|
||||||
c->ac3_downmix = ff_ac3_downmix_c;
|
c->ac3_downmix = ff_ac3_downmix_c;
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_FLAC_ENCODER
|
#if CONFIG_FLAC_ENCODER
|
||||||
c->flac_compute_autocorr = ff_flac_compute_autocorr;
|
c->flac_compute_autocorr = ff_flac_compute_autocorr;
|
||||||
#endif
|
#endif
|
||||||
c->vector_fmul = vector_fmul_c;
|
c->vector_fmul = vector_fmul_c;
|
||||||
|
@ -174,7 +174,7 @@ typedef struct ScanTable{
|
|||||||
const uint8_t *scantable;
|
const uint8_t *scantable;
|
||||||
uint8_t permutated[64];
|
uint8_t permutated[64];
|
||||||
uint8_t raster_end[64];
|
uint8_t raster_end[64];
|
||||||
#ifdef ARCH_PPC
|
#if ARCH_PPC
|
||||||
/** Used by dct_quantize_altivec to find last-non-zero */
|
/** Used by dct_quantize_altivec to find last-non-zero */
|
||||||
DECLARE_ALIGNED(16, uint8_t, inverse[64]);
|
DECLARE_ALIGNED(16, uint8_t, inverse[64]);
|
||||||
#endif
|
#endif
|
||||||
@ -584,7 +584,7 @@ void dsputil_init_vis(DSPContext* c, AVCodecContext *avctx);
|
|||||||
|
|
||||||
#define DECLARE_ALIGNED_16(t, v) DECLARE_ALIGNED(16, t, v)
|
#define DECLARE_ALIGNED_16(t, v) DECLARE_ALIGNED(16, t, v)
|
||||||
|
|
||||||
#if defined(HAVE_MMX)
|
#if HAVE_MMX
|
||||||
|
|
||||||
#undef emms_c
|
#undef emms_c
|
||||||
|
|
||||||
@ -608,23 +608,23 @@ static inline void emms(void)
|
|||||||
|
|
||||||
void dsputil_init_pix_mmx(DSPContext* c, AVCodecContext *avctx);
|
void dsputil_init_pix_mmx(DSPContext* c, AVCodecContext *avctx);
|
||||||
|
|
||||||
#elif defined(ARCH_ARM)
|
#elif ARCH_ARM
|
||||||
|
|
||||||
extern int mm_flags;
|
extern int mm_flags;
|
||||||
|
|
||||||
#ifdef HAVE_NEON
|
#if HAVE_NEON
|
||||||
# define DECLARE_ALIGNED_8(t, v) DECLARE_ALIGNED(16, t, v)
|
# define DECLARE_ALIGNED_8(t, v) DECLARE_ALIGNED(16, t, v)
|
||||||
# define STRIDE_ALIGN 16
|
# define STRIDE_ALIGN 16
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#elif defined(ARCH_PPC)
|
#elif ARCH_PPC
|
||||||
|
|
||||||
extern int mm_flags;
|
extern int mm_flags;
|
||||||
|
|
||||||
#define DECLARE_ALIGNED_8(t, v) DECLARE_ALIGNED(16, t, v)
|
#define DECLARE_ALIGNED_8(t, v) DECLARE_ALIGNED(16, t, v)
|
||||||
#define STRIDE_ALIGN 16
|
#define STRIDE_ALIGN 16
|
||||||
|
|
||||||
#elif defined(HAVE_MMI)
|
#elif HAVE_MMI
|
||||||
|
|
||||||
#define DECLARE_ALIGNED_8(t, v) DECLARE_ALIGNED(16, t, v)
|
#define DECLARE_ALIGNED_8(t, v) DECLARE_ALIGNED(16, t, v)
|
||||||
#define STRIDE_ALIGN 16
|
#define STRIDE_ALIGN 16
|
||||||
|
@ -1123,7 +1123,7 @@ static int dv_encode_video_segment(AVCodecContext *avctx, DVwork_chunk *work_chu
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_DVVIDEO_DECODER
|
#if CONFIG_DVVIDEO_DECODER
|
||||||
/* NOTE: exactly one frame must be given (120000 bytes for NTSC,
|
/* NOTE: exactly one frame must be given (120000 bytes for NTSC,
|
||||||
144000 bytes for PAL - or twice those for 50Mbps) */
|
144000 bytes for PAL - or twice those for 50Mbps) */
|
||||||
static int dvvideo_decode_frame(AVCodecContext *avctx,
|
static int dvvideo_decode_frame(AVCodecContext *avctx,
|
||||||
@ -1240,7 +1240,7 @@ static inline int dv_write_pack(enum dv_pack_type pack_id, DVVideoContext *c,
|
|||||||
return 5;
|
return 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_DVVIDEO_ENCODER
|
#if CONFIG_DVVIDEO_ENCODER
|
||||||
static void dv_format_frame(DVVideoContext* c, uint8_t* buf)
|
static void dv_format_frame(DVVideoContext* c, uint8_t* buf)
|
||||||
{
|
{
|
||||||
int chan, i, j, k;
|
int chan, i, j, k;
|
||||||
@ -1328,7 +1328,7 @@ static int dvvideo_close(AVCodecContext *c)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef CONFIG_DVVIDEO_ENCODER
|
#if CONFIG_DVVIDEO_ENCODER
|
||||||
AVCodec dvvideo_encoder = {
|
AVCodec dvvideo_encoder = {
|
||||||
"dvvideo",
|
"dvvideo",
|
||||||
CODEC_TYPE_VIDEO,
|
CODEC_TYPE_VIDEO,
|
||||||
@ -1341,7 +1341,7 @@ AVCodec dvvideo_encoder = {
|
|||||||
};
|
};
|
||||||
#endif // CONFIG_DVVIDEO_ENCODER
|
#endif // CONFIG_DVVIDEO_ENCODER
|
||||||
|
|
||||||
#ifdef CONFIG_DVVIDEO_DECODER
|
#if CONFIG_DVVIDEO_DECODER
|
||||||
AVCodec dvvideo_decoder = {
|
AVCodec dvvideo_decoder = {
|
||||||
"dvvideo",
|
"dvvideo",
|
||||||
CODEC_TYPE_VIDEO,
|
CODEC_TYPE_VIDEO,
|
||||||
|
@ -563,7 +563,7 @@ static int is_intra_more_likely(MpegEncContext *s){
|
|||||||
|
|
||||||
if(undamaged_count < 5) return 0; //almost all MBs damaged -> use temporal prediction
|
if(undamaged_count < 5) return 0; //almost all MBs damaged -> use temporal prediction
|
||||||
|
|
||||||
#ifdef CONFIG_XVMC
|
#if CONFIG_XVMC
|
||||||
//prevent dsp.sad() check, that requires access to the image
|
//prevent dsp.sad() check, that requires access to the image
|
||||||
if(s->avctx->xvmc_acceleration && s->pict_type==FF_I_TYPE) return 1;
|
if(s->avctx->xvmc_acceleration && s->pict_type==FF_I_TYPE) return 1;
|
||||||
#endif
|
#endif
|
||||||
@ -935,7 +935,7 @@ void ff_er_frame_end(MpegEncContext *s){
|
|||||||
}else
|
}else
|
||||||
guess_mv(s);
|
guess_mv(s);
|
||||||
|
|
||||||
#ifdef CONFIG_XVMC
|
#if CONFIG_XVMC
|
||||||
/* the filters below are not XvMC compatible, skip them */
|
/* the filters below are not XvMC compatible, skip them */
|
||||||
if(s->avctx->xvmc_acceleration) goto ec_clean;
|
if(s->avctx->xvmc_acceleration) goto ec_clean;
|
||||||
#endif
|
#endif
|
||||||
@ -1024,7 +1024,7 @@ void ff_er_frame_end(MpegEncContext *s){
|
|||||||
v_block_filter(s, s->current_picture.data[2], s->mb_width , s->mb_height , s->uvlinesize, 0);
|
v_block_filter(s, s->current_picture.data[2], s->mb_width , s->mb_height , s->uvlinesize, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_XVMC
|
#if CONFIG_XVMC
|
||||||
ec_clean:
|
ec_clean:
|
||||||
#endif
|
#endif
|
||||||
/* clean a few tables */
|
/* clean a few tables */
|
||||||
|
@ -91,7 +91,7 @@ int ff_fft_init(FFTContext *s, int nbits, int inverse)
|
|||||||
s->imdct_half = ff_imdct_half_c;
|
s->imdct_half = ff_imdct_half_c;
|
||||||
s->exptab1 = NULL;
|
s->exptab1 = NULL;
|
||||||
|
|
||||||
#if defined HAVE_MMX && defined HAVE_YASM
|
#if HAVE_MMX && HAVE_YASM
|
||||||
has_vectors = mm_support();
|
has_vectors = mm_support();
|
||||||
if (has_vectors & FF_MM_SSE) {
|
if (has_vectors & FF_MM_SSE) {
|
||||||
/* SSE for P3/P4/K8 */
|
/* SSE for P3/P4/K8 */
|
||||||
@ -110,7 +110,7 @@ int ff_fft_init(FFTContext *s, int nbits, int inverse)
|
|||||||
s->imdct_half = ff_imdct_half_3dn;
|
s->imdct_half = ff_imdct_half_3dn;
|
||||||
s->fft_calc = ff_fft_calc_3dn;
|
s->fft_calc = ff_fft_calc_3dn;
|
||||||
}
|
}
|
||||||
#elif defined HAVE_ALTIVEC && !defined ALTIVEC_USE_REFERENCE_C_CODE
|
#elif HAVE_ALTIVEC && !defined ALTIVEC_USE_REFERENCE_C_CODE
|
||||||
has_vectors = mm_support();
|
has_vectors = mm_support();
|
||||||
if (has_vectors & FF_MM_ALTIVEC) {
|
if (has_vectors & FF_MM_ALTIVEC) {
|
||||||
s->fft_calc = ff_fft_calc_altivec;
|
s->fft_calc = ff_fft_calc_altivec;
|
||||||
@ -336,7 +336,7 @@ static void fft8(FFTComplex *z)
|
|||||||
TRANSFORM(z[1],z[3],z[5],z[7],sqrthalf,sqrthalf);
|
TRANSFORM(z[1],z[3],z[5],z[7],sqrthalf,sqrthalf);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef CONFIG_SMALL
|
#if !CONFIG_SMALL
|
||||||
static void fft16(FFTComplex *z)
|
static void fft16(FFTComplex *z)
|
||||||
{
|
{
|
||||||
FFTSample t1, t2, t3, t4, t5, t6;
|
FFTSample t1, t2, t3, t4, t5, t6;
|
||||||
@ -358,7 +358,7 @@ DECL_FFT(64,32,16)
|
|||||||
DECL_FFT(128,64,32)
|
DECL_FFT(128,64,32)
|
||||||
DECL_FFT(256,128,64)
|
DECL_FFT(256,128,64)
|
||||||
DECL_FFT(512,256,128)
|
DECL_FFT(512,256,128)
|
||||||
#ifndef CONFIG_SMALL
|
#if !CONFIG_SMALL
|
||||||
#define pass pass_big
|
#define pass pass_big
|
||||||
#endif
|
#endif
|
||||||
DECL_FFT(1024,512,256)
|
DECL_FFT(1024,512,256)
|
||||||
|
@ -350,7 +350,7 @@ static inline int get_vlc_symbol(GetBitContext *gb, VlcState * const state, int
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_FFV1_ENCODER
|
#if CONFIG_FFV1_ENCODER
|
||||||
static inline int encode_line(FFV1Context *s, int w, int_fast16_t *sample[2], int plane_index, int bits){
|
static inline int encode_line(FFV1Context *s, int w, int_fast16_t *sample[2], int plane_index, int bits){
|
||||||
PlaneContext * const p= &s->plane[plane_index];
|
PlaneContext * const p= &s->plane[plane_index];
|
||||||
RangeCoder * const c= &s->c;
|
RangeCoder * const c= &s->c;
|
||||||
@ -543,7 +543,7 @@ static av_cold int common_init(AVCodecContext *avctx){
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_FFV1_ENCODER
|
#if CONFIG_FFV1_ENCODER
|
||||||
static av_cold int encode_init(AVCodecContext *avctx)
|
static av_cold int encode_init(AVCodecContext *avctx)
|
||||||
{
|
{
|
||||||
FFV1Context *s = avctx->priv_data;
|
FFV1Context *s = avctx->priv_data;
|
||||||
@ -632,7 +632,7 @@ static void clear_state(FFV1Context *f){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_FFV1_ENCODER
|
#if CONFIG_FFV1_ENCODER
|
||||||
static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data){
|
static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data){
|
||||||
FFV1Context *f = avctx->priv_data;
|
FFV1Context *f = avctx->priv_data;
|
||||||
RangeCoder * const c= &f->c;
|
RangeCoder * const c= &f->c;
|
||||||
@ -1025,7 +1025,7 @@ AVCodec ffv1_decoder = {
|
|||||||
.long_name= NULL_IF_CONFIG_SMALL("FFmpeg codec #1"),
|
.long_name= NULL_IF_CONFIG_SMALL("FFmpeg codec #1"),
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_FFV1_ENCODER
|
#if CONFIG_FFV1_ENCODER
|
||||||
AVCodec ffv1_encoder = {
|
AVCodec ffv1_encoder = {
|
||||||
"ffv1",
|
"ffv1",
|
||||||
CODEC_TYPE_VIDEO,
|
CODEC_TYPE_VIDEO,
|
||||||
|
@ -775,7 +775,7 @@ static void encode_residual_lpc(int32_t *res, const int32_t *smp, int n,
|
|||||||
for(i=0; i<order; i++) {
|
for(i=0; i<order; i++) {
|
||||||
res[i] = smp[i];
|
res[i] = smp[i];
|
||||||
}
|
}
|
||||||
#ifdef CONFIG_SMALL
|
#if CONFIG_SMALL
|
||||||
for(i=order; i<n; i+=2) {
|
for(i=order; i<n; i+=2) {
|
||||||
int j;
|
int j;
|
||||||
int s = smp[i];
|
int s = smp[i];
|
||||||
|
@ -285,7 +285,7 @@ static av_cold int g726_reset(G726Context* c, int index)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_ADPCM_G726_ENCODER
|
#if CONFIG_ADPCM_G726_ENCODER
|
||||||
static int16_t g726_encode(G726Context* c, int16_t sig)
|
static int16_t g726_encode(G726Context* c, int16_t sig)
|
||||||
{
|
{
|
||||||
uint8_t i;
|
uint8_t i;
|
||||||
@ -342,7 +342,7 @@ static av_cold int g726_close(AVCodecContext *avctx)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_ADPCM_G726_ENCODER
|
#if CONFIG_ADPCM_G726_ENCODER
|
||||||
static int g726_encode_frame(AVCodecContext *avctx,
|
static int g726_encode_frame(AVCodecContext *avctx,
|
||||||
uint8_t *dst, int buf_size, void *data)
|
uint8_t *dst, int buf_size, void *data)
|
||||||
{
|
{
|
||||||
@ -381,7 +381,7 @@ static int g726_decode_frame(AVCodecContext *avctx,
|
|||||||
return buf_size;
|
return buf_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_ADPCM_G726_ENCODER
|
#if CONFIG_ADPCM_G726_ENCODER
|
||||||
AVCodec adpcm_g726_encoder = {
|
AVCodec adpcm_g726_encoder = {
|
||||||
"g726",
|
"g726",
|
||||||
CODEC_TYPE_AUDIO,
|
CODEC_TYPE_AUDIO,
|
||||||
|
@ -54,7 +54,7 @@
|
|||||||
#define H263_MBTYPE_B_VLC_BITS 6
|
#define H263_MBTYPE_B_VLC_BITS 6
|
||||||
#define CBPC_B_VLC_BITS 3
|
#define CBPC_B_VLC_BITS 3
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#if CONFIG_ENCODERS
|
||||||
static void h263_encode_block(MpegEncContext * s, DCTELEM * block,
|
static void h263_encode_block(MpegEncContext * s, DCTELEM * block,
|
||||||
int n);
|
int n);
|
||||||
static void h263p_encode_umotion(MpegEncContext * s, int val);
|
static void h263p_encode_umotion(MpegEncContext * s, int val);
|
||||||
@ -72,7 +72,7 @@ static int h263_decode_block(MpegEncContext * s, DCTELEM * block,
|
|||||||
static inline int mpeg4_decode_dc(MpegEncContext * s, int n, int *dir_ptr);
|
static inline int mpeg4_decode_dc(MpegEncContext * s, int n, int *dir_ptr);
|
||||||
static inline int mpeg4_decode_block(MpegEncContext * s, DCTELEM * block,
|
static inline int mpeg4_decode_block(MpegEncContext * s, DCTELEM * block,
|
||||||
int n, int coded, int intra, int rvlc);
|
int n, int coded, int intra, int rvlc);
|
||||||
#ifdef CONFIG_ENCODERS
|
#if CONFIG_ENCODERS
|
||||||
static int h263_pred_dc(MpegEncContext * s, int n, int16_t **dc_val_ptr);
|
static int h263_pred_dc(MpegEncContext * s, int n, int16_t **dc_val_ptr);
|
||||||
static void mpeg4_encode_visual_object_header(MpegEncContext * s);
|
static void mpeg4_encode_visual_object_header(MpegEncContext * s);
|
||||||
static void mpeg4_encode_vol_header(MpegEncContext * s, int vo_number, int vol_number);
|
static void mpeg4_encode_vol_header(MpegEncContext * s, int vo_number, int vol_number);
|
||||||
@ -80,7 +80,7 @@ static void mpeg4_encode_vol_header(MpegEncContext * s, int vo_number, int vol_n
|
|||||||
static void mpeg4_decode_sprite_trajectory(MpegEncContext * s, GetBitContext *gb);
|
static void mpeg4_decode_sprite_trajectory(MpegEncContext * s, GetBitContext *gb);
|
||||||
static inline int ff_mpeg4_pred_dc(MpegEncContext * s, int n, int level, int *dir_ptr, int encoding);
|
static inline int ff_mpeg4_pred_dc(MpegEncContext * s, int n, int level, int *dir_ptr, int encoding);
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#if CONFIG_ENCODERS
|
||||||
static uint8_t uni_DCtab_lum_len[512];
|
static uint8_t uni_DCtab_lum_len[512];
|
||||||
static uint8_t uni_DCtab_chrom_len[512];
|
static uint8_t uni_DCtab_chrom_len[512];
|
||||||
static uint16_t uni_DCtab_lum_bits[512];
|
static uint16_t uni_DCtab_lum_bits[512];
|
||||||
@ -155,7 +155,7 @@ static void show_pict_info(MpegEncContext *s){
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#if CONFIG_ENCODERS
|
||||||
|
|
||||||
static void aspect_to_info(MpegEncContext * s, AVRational aspect){
|
static void aspect_to_info(MpegEncContext * s, AVRational aspect){
|
||||||
int i;
|
int i;
|
||||||
@ -736,7 +736,7 @@ void ff_h263_update_motion_val(MpegEncContext * s){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#if CONFIG_ENCODERS
|
||||||
|
|
||||||
static inline int h263_get_motion_length(MpegEncContext * s, int val, int f_code){
|
static inline int h263_get_motion_length(MpegEncContext * s, int val, int f_code){
|
||||||
int l, bit_size, code;
|
int l, bit_size, code;
|
||||||
@ -1549,7 +1549,7 @@ void ff_h263_loop_filter(MpegEncContext * s){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#if CONFIG_ENCODERS
|
||||||
static int h263_pred_dc(MpegEncContext * s, int n, int16_t **dc_val_ptr)
|
static int h263_pred_dc(MpegEncContext * s, int n, int16_t **dc_val_ptr)
|
||||||
{
|
{
|
||||||
int x, y, wrap, a, c, pred_dc, scale;
|
int x, y, wrap, a, c, pred_dc, scale;
|
||||||
@ -1741,7 +1741,7 @@ int16_t *h263_pred_motion(MpegEncContext * s, int block, int dir,
|
|||||||
return *mot_val;
|
return *mot_val;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#if CONFIG_ENCODERS
|
||||||
void ff_h263_encode_motion(MpegEncContext * s, int val, int f_code)
|
void ff_h263_encode_motion(MpegEncContext * s, int val, int f_code)
|
||||||
{
|
{
|
||||||
int range, l, bit_size, sign, code, bits;
|
int range, l, bit_size, sign, code, bits;
|
||||||
@ -2652,7 +2652,7 @@ void mpeg4_pred_ac(MpegEncContext * s, DCTELEM *block, int n,
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#if CONFIG_ENCODERS
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* encodes the dc value.
|
* encodes the dc value.
|
||||||
@ -3049,7 +3049,7 @@ static inline void memsetw(short *tab, int val, int n)
|
|||||||
tab[i] = val;
|
tab[i] = val;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#if CONFIG_ENCODERS
|
||||||
|
|
||||||
void ff_mpeg4_init_partitions(MpegEncContext *s)
|
void ff_mpeg4_init_partitions(MpegEncContext *s)
|
||||||
{
|
{
|
||||||
@ -3106,7 +3106,7 @@ int ff_mpeg4_get_video_packet_prefix_length(MpegEncContext *s){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#if CONFIG_ENCODERS
|
||||||
|
|
||||||
void ff_mpeg4_encode_video_packet_header(MpegEncContext *s)
|
void ff_mpeg4_encode_video_packet_header(MpegEncContext *s)
|
||||||
{
|
{
|
||||||
@ -4563,7 +4563,7 @@ static int h263_decode_block(MpegEncContext * s, DCTELEM * block,
|
|||||||
} else if (s->mb_intra) {
|
} else if (s->mb_intra) {
|
||||||
/* DC coef */
|
/* DC coef */
|
||||||
if(s->codec_id == CODEC_ID_RV10){
|
if(s->codec_id == CODEC_ID_RV10){
|
||||||
#ifdef CONFIG_RV10_DECODER
|
#if CONFIG_RV10_DECODER
|
||||||
if (s->rv10_version == 3 && s->pict_type == FF_I_TYPE) {
|
if (s->rv10_version == 3 && s->pict_type == FF_I_TYPE) {
|
||||||
int component, diff;
|
int component, diff;
|
||||||
component = (n <= 3 ? 0 : n - 4 + 1);
|
component = (n <= 3 ? 0 : n - 4 + 1);
|
||||||
|
@ -545,7 +545,7 @@ retry:
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(HAVE_MMX)
|
#if HAVE_MMX
|
||||||
if(s->codec_id == CODEC_ID_MPEG4 && s->xvid_build && avctx->idct_algo == FF_IDCT_AUTO && (mm_flags & FF_MM_MMX)){
|
if(s->codec_id == CODEC_ID_MPEG4 && s->xvid_build && avctx->idct_algo == FF_IDCT_AUTO && (mm_flags & FF_MM_MMX)){
|
||||||
avctx->idct_algo= FF_IDCT_XVIDMMX;
|
avctx->idct_algo= FF_IDCT_XVIDMMX;
|
||||||
avctx->coded_width= 0; // force reinit
|
avctx->coded_width= 0; // force reinit
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
#include "vdpau_internal.h"
|
#include "vdpau_internal.h"
|
||||||
|
|
||||||
#include "cabac.h"
|
#include "cabac.h"
|
||||||
#ifdef ARCH_X86
|
#if ARCH_X86
|
||||||
#include "x86/h264_i386.h"
|
#include "x86/h264_i386.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -1380,8 +1380,8 @@ static const uint8_t *decode_nal(H264Context *h, const uint8_t *src, int *dst_le
|
|||||||
printf("%2X ", src[i]);
|
printf("%2X ", src[i]);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_FAST_UNALIGNED
|
#if HAVE_FAST_UNALIGNED
|
||||||
# ifdef HAVE_FAST_64BIT
|
# if HAVE_FAST_64BIT
|
||||||
# define RS 7
|
# define RS 7
|
||||||
for(i=0; i+1<length; i+=9){
|
for(i=0; i+1<length; i+=9){
|
||||||
if(!((~*(uint64_t*)(src+i) & (*(uint64_t*)(src+i) - 0x0100010001000101ULL)) & 0x8000800080008080ULL))
|
if(!((~*(uint64_t*)(src+i) & (*(uint64_t*)(src+i) - 0x0100010001000101ULL)) & 0x8000800080008080ULL))
|
||||||
@ -5224,7 +5224,7 @@ static av_always_inline void decode_cabac_residual_internal( H264Context *h, DCT
|
|||||||
uint8_t *last_coeff_ctx_base;
|
uint8_t *last_coeff_ctx_base;
|
||||||
uint8_t *abs_level_m1_ctx_base;
|
uint8_t *abs_level_m1_ctx_base;
|
||||||
|
|
||||||
#ifndef ARCH_X86
|
#if !ARCH_X86
|
||||||
#define CABAC_ON_STACK
|
#define CABAC_ON_STACK
|
||||||
#endif
|
#endif
|
||||||
#ifdef CABAC_ON_STACK
|
#ifdef CABAC_ON_STACK
|
||||||
@ -5285,7 +5285,7 @@ static av_always_inline void decode_cabac_residual_internal( H264Context *h, DCT
|
|||||||
index[coeff_count++] = last;\
|
index[coeff_count++] = last;\
|
||||||
}
|
}
|
||||||
const uint8_t *sig_off = significant_coeff_flag_offset_8x8[MB_FIELD];
|
const uint8_t *sig_off = significant_coeff_flag_offset_8x8[MB_FIELD];
|
||||||
#if defined(ARCH_X86) && defined(HAVE_7REGS) && defined(HAVE_EBX_AVAILABLE) && !defined(BROKEN_RELOCATIONS)
|
#if ARCH_X86 && HAVE_7REGS && HAVE_EBX_AVAILABLE && !defined(BROKEN_RELOCATIONS)
|
||||||
coeff_count= decode_significance_8x8_x86(CC, significant_coeff_ctx_base, index, sig_off);
|
coeff_count= decode_significance_8x8_x86(CC, significant_coeff_ctx_base, index, sig_off);
|
||||||
} else {
|
} else {
|
||||||
coeff_count= decode_significance_x86(CC, max_coeff, significant_coeff_ctx_base, index);
|
coeff_count= decode_significance_x86(CC, max_coeff, significant_coeff_ctx_base, index);
|
||||||
@ -5360,7 +5360,7 @@ static av_always_inline void decode_cabac_residual_internal( H264Context *h, DCT
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef CONFIG_SMALL
|
#if !CONFIG_SMALL
|
||||||
static void decode_cabac_residual_dc( H264Context *h, DCTELEM *block, int cat, int n, const uint8_t *scantable, const uint32_t *qmul, int max_coeff ) {
|
static void decode_cabac_residual_dc( H264Context *h, DCTELEM *block, int cat, int n, const uint8_t *scantable, const uint32_t *qmul, int max_coeff ) {
|
||||||
decode_cabac_residual_internal(h, block, cat, n, scantable, qmul, max_coeff, 1);
|
decode_cabac_residual_internal(h, block, cat, n, scantable, qmul, max_coeff, 1);
|
||||||
}
|
}
|
||||||
@ -5371,7 +5371,7 @@ static void decode_cabac_residual_nondc( H264Context *h, DCTELEM *block, int cat
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void decode_cabac_residual( H264Context *h, DCTELEM *block, int cat, int n, const uint8_t *scantable, const uint32_t *qmul, int max_coeff ) {
|
static void decode_cabac_residual( H264Context *h, DCTELEM *block, int cat, int n, const uint8_t *scantable, const uint32_t *qmul, int max_coeff ) {
|
||||||
#ifdef CONFIG_SMALL
|
#if CONFIG_SMALL
|
||||||
decode_cabac_residual_internal(h, block, cat, n, scantable, qmul, max_coeff, cat == 0 || cat == 3);
|
decode_cabac_residual_internal(h, block, cat, n, scantable, qmul, max_coeff, cat == 0 || cat == 3);
|
||||||
#else
|
#else
|
||||||
if( cat == 0 || cat == 3 ) decode_cabac_residual_dc(h, block, cat, n, scantable, qmul, max_coeff);
|
if( cat == 0 || cat == 3 ) decode_cabac_residual_dc(h, block, cat, n, scantable, qmul, max_coeff);
|
||||||
@ -6572,7 +6572,7 @@ static void filter_mb( H264Context *h, int mb_x, int mb_y, uint8_t *img_y, uint8
|
|||||||
filter_mb_mbaff_edgecv( h, &img_cr[0], uvlinesize, bS, rqp );
|
filter_mb_mbaff_edgecv( h, &img_cr[0], uvlinesize, bS, rqp );
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_SMALL
|
#if CONFIG_SMALL
|
||||||
for( dir = 0; dir < 2; dir++ )
|
for( dir = 0; dir < 2; dir++ )
|
||||||
filter_mb_dir(h, mb_x, mb_y, img_y, img_cb, img_cr, linesize, uvlinesize, mb_xy, mb_type, mvy_limit, dir ? 0 : first_vertical_edge_done, dir);
|
filter_mb_dir(h, mb_x, mb_y, img_y, img_cb, img_cr, linesize, uvlinesize, mb_xy, mb_type, mvy_limit, dir ? 0 : first_vertical_edge_done, dir);
|
||||||
#else
|
#else
|
||||||
@ -8023,7 +8023,7 @@ AVCodec h264_decoder = {
|
|||||||
.long_name = NULL_IF_CONFIG_SMALL("H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10"),
|
.long_name = NULL_IF_CONFIG_SMALL("H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10"),
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_H264_VDPAU_DECODER
|
#if CONFIG_H264_VDPAU_DECODER
|
||||||
AVCodec h264_vdpau_decoder = {
|
AVCodec h264_vdpau_decoder = {
|
||||||
"h264_vdpau",
|
"h264_vdpau",
|
||||||
CODEC_TYPE_VIDEO,
|
CODEC_TYPE_VIDEO,
|
||||||
@ -8039,6 +8039,6 @@ AVCodec h264_vdpau_decoder = {
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_SVQ3_DECODER
|
#if CONFIG_SVQ3_DECODER
|
||||||
#include "svq3.c"
|
#include "svq3.c"
|
||||||
#endif
|
#endif
|
||||||
|
@ -44,11 +44,11 @@ int ff_h264_find_frame_end(H264Context *h, const uint8_t *buf, int buf_size)
|
|||||||
|
|
||||||
for(i=0; i<buf_size; i++){
|
for(i=0; i<buf_size; i++){
|
||||||
if(state==7){
|
if(state==7){
|
||||||
#ifdef HAVE_FAST_UNALIGNED
|
#if HAVE_FAST_UNALIGNED
|
||||||
/* we check i<buf_size instead of i+3/7 because its simpler
|
/* we check i<buf_size instead of i+3/7 because its simpler
|
||||||
* and there should be FF_INPUT_BUFFER_PADDING_SIZE bytes at the end
|
* and there should be FF_INPUT_BUFFER_PADDING_SIZE bytes at the end
|
||||||
*/
|
*/
|
||||||
# ifdef HAVE_FAST_64BIT
|
# if HAVE_FAST_64BIT
|
||||||
while(i<buf_size && !((~*(uint64_t*)(buf+i) & (*(uint64_t*)(buf+i) - 0x0101010101010101ULL)) & 0x8080808080808080ULL))
|
while(i<buf_size && !((~*(uint64_t*)(buf+i) & (*(uint64_t*)(buf+i) - 0x0101010101010101ULL)) & 0x8080808080808080ULL))
|
||||||
i+=8;
|
i+=8;
|
||||||
# else
|
# else
|
||||||
|
@ -261,7 +261,7 @@ static int generate_bits_table(uint32_t *dst, uint8_t *len_table){
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(CONFIG_HUFFYUV_ENCODER) || defined(CONFIG_FFVHUFF_ENCODER)
|
#if CONFIG_HUFFYUV_ENCODER || CONFIG_FFVHUFF_ENCODER
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint64_t val;
|
uint64_t val;
|
||||||
int name;
|
int name;
|
||||||
@ -317,7 +317,7 @@ static void generate_len_table(uint8_t *dst, uint64_t *stats, int size){
|
|||||||
if(i==size) break;
|
if(i==size) break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* defined(CONFIG_HUFFYUV_ENCODER) || defined(CONFIG_FFVHUFF_ENCODER) */
|
#endif /* CONFIG_HUFFYUV_ENCODER || CONFIG_FFVHUFF_ENCODER */
|
||||||
|
|
||||||
static void generate_joint_tables(HYuvContext *s){
|
static void generate_joint_tables(HYuvContext *s){
|
||||||
uint16_t symbols[1<<VLC_BITS];
|
uint16_t symbols[1<<VLC_BITS];
|
||||||
@ -477,7 +477,7 @@ static int common_init(AVCodecContext *avctx){
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(CONFIG_HUFFYUV_DECODER) || defined(CONFIG_FFVHUFF_DECODER)
|
#if CONFIG_HUFFYUV_DECODER || CONFIG_FFVHUFF_DECODER
|
||||||
static av_cold int decode_init(AVCodecContext *avctx)
|
static av_cold int decode_init(AVCodecContext *avctx)
|
||||||
{
|
{
|
||||||
HYuvContext *s = avctx->priv_data;
|
HYuvContext *s = avctx->priv_data;
|
||||||
@ -573,9 +573,9 @@ s->bgr32=1;
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif /* defined(CONFIG_HUFFYUV_DECODER) || defined(CONFIG_FFVHUFF_DECODER) */
|
#endif /* CONFIG_HUFFYUV_DECODER || CONFIG_FFVHUFF_DECODER */
|
||||||
|
|
||||||
#if defined(CONFIG_HUFFYUV_ENCODER) || defined(CONFIG_FFVHUFF_ENCODER)
|
#if CONFIG_HUFFYUV_ENCODER || CONFIG_FFVHUFF_ENCODER
|
||||||
static int store_table(HYuvContext *s, uint8_t *len, uint8_t *buf){
|
static int store_table(HYuvContext *s, uint8_t *len, uint8_t *buf){
|
||||||
int i;
|
int i;
|
||||||
int index= 0;
|
int index= 0;
|
||||||
@ -725,7 +725,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif /* defined(CONFIG_HUFFYUV_ENCODER) || defined(CONFIG_FFVHUFF_ENCODER) */
|
#endif /* CONFIG_HUFFYUV_ENCODER || CONFIG_FFVHUFF_ENCODER */
|
||||||
|
|
||||||
/* TODO instead of restarting the read when the code isn't in the first level
|
/* TODO instead of restarting the read when the code isn't in the first level
|
||||||
* of the joint table, jump into the 2nd level of the individual table. */
|
* of the joint table, jump into the 2nd level of the individual table. */
|
||||||
@ -761,7 +761,7 @@ static void decode_gray_bitstream(HYuvContext *s, int count){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(CONFIG_HUFFYUV_ENCODER) || defined(CONFIG_FFVHUFF_ENCODER)
|
#if CONFIG_HUFFYUV_ENCODER || CONFIG_FFVHUFF_ENCODER
|
||||||
static int encode_422_bitstream(HYuvContext *s, int count){
|
static int encode_422_bitstream(HYuvContext *s, int count){
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@ -854,7 +854,7 @@ static int encode_gray_bitstream(HYuvContext *s, int count){
|
|||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif /* defined(CONFIG_HUFFYUV_ENCODER) || defined(CONFIG_FFVHUFF_ENCODER) */
|
#endif /* CONFIG_HUFFYUV_ENCODER || CONFIG_FFVHUFF_ENCODER */
|
||||||
|
|
||||||
static av_always_inline void decode_bgr_1(HYuvContext *s, int count, int decorrelate, int alpha){
|
static av_always_inline void decode_bgr_1(HYuvContext *s, int count, int decorrelate, int alpha){
|
||||||
int i;
|
int i;
|
||||||
@ -931,7 +931,7 @@ static int encode_bgr_bitstream(HYuvContext *s, int count){
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(CONFIG_HUFFYUV_DECODER) || defined(CONFIG_FFVHUFF_DECODER)
|
#if CONFIG_HUFFYUV_DECODER || CONFIG_FFVHUFF_DECODER
|
||||||
static void draw_slice(HYuvContext *s, int y){
|
static void draw_slice(HYuvContext *s, int y){
|
||||||
int h, cy;
|
int h, cy;
|
||||||
int offset[4];
|
int offset[4];
|
||||||
@ -1198,7 +1198,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, const
|
|||||||
|
|
||||||
return (get_bits_count(&s->gb)+31)/32*4 + table_size;
|
return (get_bits_count(&s->gb)+31)/32*4 + table_size;
|
||||||
}
|
}
|
||||||
#endif /* defined(CONFIG_HUFFYUV_DECODER) || defined(CONFIG_FFVHUFF_DECODER) */
|
#endif /* CONFIG_HUFFYUV_DECODER || CONFIG_FFVHUFF_DECODER */
|
||||||
|
|
||||||
static int common_end(HYuvContext *s){
|
static int common_end(HYuvContext *s){
|
||||||
int i;
|
int i;
|
||||||
@ -1209,7 +1209,7 @@ static int common_end(HYuvContext *s){
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(CONFIG_HUFFYUV_DECODER) || defined(CONFIG_FFVHUFF_DECODER)
|
#if CONFIG_HUFFYUV_DECODER || CONFIG_FFVHUFF_DECODER
|
||||||
static av_cold int decode_end(AVCodecContext *avctx)
|
static av_cold int decode_end(AVCodecContext *avctx)
|
||||||
{
|
{
|
||||||
HYuvContext *s = avctx->priv_data;
|
HYuvContext *s = avctx->priv_data;
|
||||||
@ -1224,9 +1224,9 @@ static av_cold int decode_end(AVCodecContext *avctx)
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif /* defined(CONFIG_HUFFYUV_DECODER) || defined(CONFIG_FFVHUFF_DECODER) */
|
#endif /* CONFIG_HUFFYUV_DECODER || CONFIG_FFVHUFF_DECODER */
|
||||||
|
|
||||||
#if defined(CONFIG_HUFFYUV_ENCODER) || defined(CONFIG_FFVHUFF_ENCODER)
|
#if CONFIG_HUFFYUV_ENCODER || CONFIG_FFVHUFF_ENCODER
|
||||||
static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data){
|
static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data){
|
||||||
HYuvContext *s = avctx->priv_data;
|
HYuvContext *s = avctx->priv_data;
|
||||||
AVFrame *pict = data;
|
AVFrame *pict = data;
|
||||||
@ -1431,9 +1431,9 @@ static av_cold int encode_end(AVCodecContext *avctx)
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif /* defined(CONFIG_HUFFYUV_ENCODER) || defined(CONFIG_FFVHUFF_ENCODER) */
|
#endif /* CONFIG_HUFFYUV_ENCODER || CONFIG_FFVHUFF_ENCODER */
|
||||||
|
|
||||||
#ifdef CONFIG_HUFFYUV_DECODER
|
#if CONFIG_HUFFYUV_DECODER
|
||||||
AVCodec huffyuv_decoder = {
|
AVCodec huffyuv_decoder = {
|
||||||
"huffyuv",
|
"huffyuv",
|
||||||
CODEC_TYPE_VIDEO,
|
CODEC_TYPE_VIDEO,
|
||||||
@ -1449,7 +1449,7 @@ AVCodec huffyuv_decoder = {
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_FFVHUFF_DECODER
|
#if CONFIG_FFVHUFF_DECODER
|
||||||
AVCodec ffvhuff_decoder = {
|
AVCodec ffvhuff_decoder = {
|
||||||
"ffvhuff",
|
"ffvhuff",
|
||||||
CODEC_TYPE_VIDEO,
|
CODEC_TYPE_VIDEO,
|
||||||
@ -1465,7 +1465,7 @@ AVCodec ffvhuff_decoder = {
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_HUFFYUV_ENCODER
|
#if CONFIG_HUFFYUV_ENCODER
|
||||||
AVCodec huffyuv_encoder = {
|
AVCodec huffyuv_encoder = {
|
||||||
"huffyuv",
|
"huffyuv",
|
||||||
CODEC_TYPE_VIDEO,
|
CODEC_TYPE_VIDEO,
|
||||||
@ -1479,7 +1479,7 @@ AVCodec huffyuv_encoder = {
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_FFVHUFF_ENCODER
|
#if CONFIG_FFVHUFF_ENCODER
|
||||||
AVCodec ffvhuff_encoder = {
|
AVCodec ffvhuff_encoder = {
|
||||||
"ffvhuff",
|
"ffvhuff",
|
||||||
CODEC_TYPE_VIDEO,
|
CODEC_TYPE_VIDEO,
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
#include "dsputil.h"
|
#include "dsputil.h"
|
||||||
#include "colorspace.h"
|
#include "colorspace.h"
|
||||||
|
|
||||||
#ifdef HAVE_MMX
|
#if HAVE_MMX
|
||||||
#include "x86/mmx.h"
|
#include "x86/mmx.h"
|
||||||
#include "x86/dsputil_mmx.h"
|
#include "x86/dsputil_mmx.h"
|
||||||
#endif
|
#endif
|
||||||
@ -2089,7 +2089,7 @@ int av_picture_pad(AVPicture *dst, const AVPicture *src, int height, int width,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef CONFIG_SWSCALE
|
#if !CONFIG_SWSCALE
|
||||||
static uint8_t y_ccir_to_jpeg[256];
|
static uint8_t y_ccir_to_jpeg[256];
|
||||||
static uint8_t y_jpeg_to_ccir[256];
|
static uint8_t y_jpeg_to_ccir[256];
|
||||||
static uint8_t c_ccir_to_jpeg[256];
|
static uint8_t c_ccir_to_jpeg[256];
|
||||||
@ -2662,7 +2662,7 @@ int img_get_alpha_info(const AVPicture *src,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_MMX
|
#if HAVE_MMX
|
||||||
#define DEINT_INPLACE_LINE_LUM \
|
#define DEINT_INPLACE_LINE_LUM \
|
||||||
movd_m2r(lum_m4[0],mm0);\
|
movd_m2r(lum_m4[0],mm0);\
|
||||||
movd_m2r(lum_m3[0],mm1);\
|
movd_m2r(lum_m3[0],mm1);\
|
||||||
@ -2716,7 +2716,7 @@ static void deinterlace_line(uint8_t *dst,
|
|||||||
const uint8_t *lum,
|
const uint8_t *lum,
|
||||||
int size)
|
int size)
|
||||||
{
|
{
|
||||||
#ifndef HAVE_MMX
|
#if !HAVE_MMX
|
||||||
uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
|
uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
|
||||||
int sum;
|
int sum;
|
||||||
|
|
||||||
@ -2754,7 +2754,7 @@ static void deinterlace_line(uint8_t *dst,
|
|||||||
static void deinterlace_line_inplace(uint8_t *lum_m4, uint8_t *lum_m3, uint8_t *lum_m2, uint8_t *lum_m1, uint8_t *lum,
|
static void deinterlace_line_inplace(uint8_t *lum_m4, uint8_t *lum_m3, uint8_t *lum_m2, uint8_t *lum_m1, uint8_t *lum,
|
||||||
int size)
|
int size)
|
||||||
{
|
{
|
||||||
#ifndef HAVE_MMX
|
#if !HAVE_MMX
|
||||||
uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
|
uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
|
||||||
int sum;
|
int sum;
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
#include "imgconvert.h"
|
#include "imgconvert.h"
|
||||||
#include "libswscale/swscale.h"
|
#include "libswscale/swscale.h"
|
||||||
|
|
||||||
#ifdef HAVE_ALTIVEC
|
#if HAVE_ALTIVEC
|
||||||
#include "ppc/imgresample_altivec.h"
|
#include "ppc/imgresample_altivec.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -153,7 +153,7 @@ static void v_resample(uint8_t *dst, int dst_width, const uint8_t *src,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_MMX
|
#if HAVE_MMX
|
||||||
|
|
||||||
#include "x86/mmx.h"
|
#include "x86/mmx.h"
|
||||||
|
|
||||||
@ -340,7 +340,7 @@ static void h_resample(uint8_t *dst, int dst_width, const uint8_t *src,
|
|||||||
} else {
|
} else {
|
||||||
n = dst_width;
|
n = dst_width;
|
||||||
}
|
}
|
||||||
#ifdef HAVE_MMX
|
#if HAVE_MMX
|
||||||
if ((mm_flags & FF_MM_MMX) && NB_TAPS == 4)
|
if ((mm_flags & FF_MM_MMX) && NB_TAPS == 4)
|
||||||
h_resample_fast4_mmx(dst, n,
|
h_resample_fast4_mmx(dst, n,
|
||||||
src, src_width, src_start, src_incr, filters);
|
src, src_width, src_start, src_incr, filters);
|
||||||
@ -397,7 +397,7 @@ static void component_resample(ImgReSampleContext *s,
|
|||||||
}
|
}
|
||||||
/* apply vertical filter */
|
/* apply vertical filter */
|
||||||
phase_y = get_phase(src_y);
|
phase_y = get_phase(src_y);
|
||||||
#ifdef HAVE_MMX
|
#if HAVE_MMX
|
||||||
/* desactivated MMX because loss of precision */
|
/* desactivated MMX because loss of precision */
|
||||||
if ((mm_flags & FF_MM_MMX) && NB_TAPS == 4 && 0)
|
if ((mm_flags & FF_MM_MMX) && NB_TAPS == 4 && 0)
|
||||||
v_resample4_mmx(output, owidth,
|
v_resample4_mmx(output, owidth,
|
||||||
@ -405,7 +405,7 @@ static void component_resample(ImgReSampleContext *s,
|
|||||||
&s->v_filters[phase_y][0]);
|
&s->v_filters[phase_y][0]);
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_ALTIVEC
|
#if HAVE_ALTIVEC
|
||||||
if ((mm_flags & FF_MM_ALTIVEC) && NB_TAPS == 4 && FILTER_BITS <= 6)
|
if ((mm_flags & FF_MM_ALTIVEC) && NB_TAPS == 4 && FILTER_BITS <= 6)
|
||||||
v_resample16_altivec(output, owidth,
|
v_resample16_altivec(output, owidth,
|
||||||
s->line_buf + (ring_y - NB_TAPS + 1) * owidth,
|
s->line_buf + (ring_y - NB_TAPS + 1) * owidth,
|
||||||
@ -732,7 +732,7 @@ static void dump_filter(int16_t *filter)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_MMX
|
#if HAVE_MMX
|
||||||
int mm_flags;
|
int mm_flags;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -804,7 +804,7 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* mmx test */
|
/* mmx test */
|
||||||
#ifdef HAVE_MMX
|
#if HAVE_MMX
|
||||||
av_log(NULL, AV_LOG_INFO, "MMX test\n");
|
av_log(NULL, AV_LOG_INFO, "MMX test\n");
|
||||||
fact = 0.72;
|
fact = 0.72;
|
||||||
xsize = (int)(XSIZE * fact);
|
xsize = (int)(XSIZE * fact);
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
#include "bitstream.h"
|
#include "bitstream.h"
|
||||||
#include "lcl.h"
|
#include "lcl.h"
|
||||||
|
|
||||||
#ifdef CONFIG_ZLIB
|
#if CONFIG_ZLIB
|
||||||
#include <zlib.h>
|
#include <zlib.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -65,7 +65,7 @@ typedef struct LclDecContext {
|
|||||||
unsigned int decomp_size;
|
unsigned int decomp_size;
|
||||||
// Decompression buffer
|
// Decompression buffer
|
||||||
unsigned char* decomp_buf;
|
unsigned char* decomp_buf;
|
||||||
#ifdef CONFIG_ZLIB
|
#if CONFIG_ZLIB
|
||||||
z_stream zstream;
|
z_stream zstream;
|
||||||
#endif
|
#endif
|
||||||
} LclDecContext;
|
} LclDecContext;
|
||||||
@ -174,7 +174,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, const
|
|||||||
unsigned char yq, y1q, uq, vq;
|
unsigned char yq, y1q, uq, vq;
|
||||||
int uqvq;
|
int uqvq;
|
||||||
unsigned int mthread_inlen, mthread_outlen;
|
unsigned int mthread_inlen, mthread_outlen;
|
||||||
#ifdef CONFIG_ZLIB
|
#if CONFIG_ZLIB
|
||||||
int zret; // Zlib return code
|
int zret; // Zlib return code
|
||||||
#endif
|
#endif
|
||||||
unsigned int len = buf_size;
|
unsigned int len = buf_size;
|
||||||
@ -235,7 +235,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, const
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case CODEC_ID_ZLIB:
|
case CODEC_ID_ZLIB:
|
||||||
#ifdef CONFIG_ZLIB
|
#if CONFIG_ZLIB
|
||||||
/* Using the original dll with normal compression (-1) and RGB format
|
/* Using the original dll with normal compression (-1) and RGB format
|
||||||
* gives a file with ZLIB fourcc, but frame is really uncompressed.
|
* gives a file with ZLIB fourcc, but frame is really uncompressed.
|
||||||
* To be sure that's true check also frame size */
|
* To be sure that's true check also frame size */
|
||||||
@ -524,7 +524,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
|||||||
|
|
||||||
c->pic.data[0] = NULL;
|
c->pic.data[0] = NULL;
|
||||||
|
|
||||||
#ifdef CONFIG_ZLIB
|
#if CONFIG_ZLIB
|
||||||
// Needed if zlib unused or init aborted before inflateInit
|
// Needed if zlib unused or init aborted before inflateInit
|
||||||
memset(&(c->zstream), 0, sizeof(z_stream));
|
memset(&(c->zstream), 0, sizeof(z_stream));
|
||||||
#endif
|
#endif
|
||||||
@ -599,7 +599,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case CODEC_ID_ZLIB:
|
case CODEC_ID_ZLIB:
|
||||||
#ifdef CONFIG_ZLIB
|
#if CONFIG_ZLIB
|
||||||
switch (c->compression) {
|
switch (c->compression) {
|
||||||
case COMP_ZLIB_HISPEED:
|
case COMP_ZLIB_HISPEED:
|
||||||
av_log(avctx, AV_LOG_INFO, "High speed compression.\n");
|
av_log(avctx, AV_LOG_INFO, "High speed compression.\n");
|
||||||
@ -648,7 +648,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
|||||||
|
|
||||||
/* If needed init zlib */
|
/* If needed init zlib */
|
||||||
if (avctx->codec_id == CODEC_ID_ZLIB) {
|
if (avctx->codec_id == CODEC_ID_ZLIB) {
|
||||||
#ifdef CONFIG_ZLIB
|
#if CONFIG_ZLIB
|
||||||
c->zstream.zalloc = Z_NULL;
|
c->zstream.zalloc = Z_NULL;
|
||||||
c->zstream.zfree = Z_NULL;
|
c->zstream.zfree = Z_NULL;
|
||||||
c->zstream.opaque = Z_NULL;
|
c->zstream.opaque = Z_NULL;
|
||||||
@ -679,14 +679,14 @@ static av_cold int decode_end(AVCodecContext *avctx)
|
|||||||
|
|
||||||
if (c->pic.data[0])
|
if (c->pic.data[0])
|
||||||
avctx->release_buffer(avctx, &c->pic);
|
avctx->release_buffer(avctx, &c->pic);
|
||||||
#ifdef CONFIG_ZLIB
|
#if CONFIG_ZLIB
|
||||||
inflateEnd(&(c->zstream));
|
inflateEnd(&(c->zstream));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_MSZH_DECODER
|
#if CONFIG_MSZH_DECODER
|
||||||
AVCodec mszh_decoder = {
|
AVCodec mszh_decoder = {
|
||||||
"mszh",
|
"mszh",
|
||||||
CODEC_TYPE_VIDEO,
|
CODEC_TYPE_VIDEO,
|
||||||
@ -701,7 +701,7 @@ AVCodec mszh_decoder = {
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_ZLIB_DECODER
|
#if CONFIG_ZLIB_DECODER
|
||||||
AVCodec zlib_decoder = {
|
AVCodec zlib_decoder = {
|
||||||
"zlib",
|
"zlib",
|
||||||
CODEC_TYPE_VIDEO,
|
CODEC_TYPE_VIDEO,
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
#include "bitstream.h"
|
#include "bitstream.h"
|
||||||
#include "lcl.h"
|
#include "lcl.h"
|
||||||
|
|
||||||
#ifdef CONFIG_ZLIB
|
#if CONFIG_ZLIB
|
||||||
#include <zlib.h>
|
#include <zlib.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -70,7 +70,7 @@ typedef struct LclEncContext {
|
|||||||
unsigned int max_comp_size;
|
unsigned int max_comp_size;
|
||||||
// Compression buffer
|
// Compression buffer
|
||||||
unsigned char* comp_buf;
|
unsigned char* comp_buf;
|
||||||
#ifdef CONFIG_ZLIB
|
#if CONFIG_ZLIB
|
||||||
z_stream zstream;
|
z_stream zstream;
|
||||||
#endif
|
#endif
|
||||||
} LclEncContext;
|
} LclEncContext;
|
||||||
@ -87,7 +87,7 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size,
|
|||||||
int i;
|
int i;
|
||||||
int zret; // Zlib return code
|
int zret; // Zlib return code
|
||||||
|
|
||||||
#ifndef CONFIG_ZLIB
|
#if !CONFIG_ZLIB
|
||||||
av_log(avctx, AV_LOG_ERROR, "Zlib support not compiled in.\n");
|
av_log(avctx, AV_LOG_ERROR, "Zlib support not compiled in.\n");
|
||||||
return -1;
|
return -1;
|
||||||
#else
|
#else
|
||||||
@ -144,7 +144,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
|
|||||||
LclEncContext *c = avctx->priv_data;
|
LclEncContext *c = avctx->priv_data;
|
||||||
int zret; // Zlib return code
|
int zret; // Zlib return code
|
||||||
|
|
||||||
#ifndef CONFIG_ZLIB
|
#if !CONFIG_ZLIB
|
||||||
av_log(avctx, AV_LOG_ERROR, "Zlib support not compiled.\n");
|
av_log(avctx, AV_LOG_ERROR, "Zlib support not compiled.\n");
|
||||||
return 1;
|
return 1;
|
||||||
#else
|
#else
|
||||||
@ -213,7 +213,7 @@ static av_cold int encode_end(AVCodecContext *avctx)
|
|||||||
|
|
||||||
av_freep(&avctx->extradata);
|
av_freep(&avctx->extradata);
|
||||||
av_freep(&c->comp_buf);
|
av_freep(&c->comp_buf);
|
||||||
#ifdef CONFIG_ZLIB
|
#if CONFIG_ZLIB
|
||||||
deflateEnd(&(c->zstream));
|
deflateEnd(&(c->zstream));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@
|
|||||||
|
|
||||||
#include "avcodec.h"
|
#include "avcodec.h"
|
||||||
|
|
||||||
#ifdef CONFIG_LIBAMR_NB_FIXED
|
#if CONFIG_LIBAMR_NB_FIXED
|
||||||
|
|
||||||
#define MMS_IO
|
#define MMS_IO
|
||||||
|
|
||||||
@ -137,7 +137,7 @@ static void amr_decode_fix_avctx(AVCodecContext * avctx)
|
|||||||
avctx->sample_fmt = SAMPLE_FMT_S16;
|
avctx->sample_fmt = SAMPLE_FMT_S16;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_LIBAMR_NB_FIXED
|
#if CONFIG_LIBAMR_NB_FIXED
|
||||||
/* fixed point version*/
|
/* fixed point version*/
|
||||||
/* frame size in serial bitstream file (frame type + serial stream + flags) */
|
/* frame size in serial bitstream file (frame type + serial stream + flags) */
|
||||||
#define SERIAL_FRAMESIZE (1+MAX_SERIAL_SIZE+5)
|
#define SERIAL_FRAMESIZE (1+MAX_SERIAL_SIZE+5)
|
||||||
@ -353,7 +353,7 @@ static int amr_nb_encode_frame(AVCodecContext *avctx,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#elif defined(CONFIG_LIBAMR_NB) /* Float point version*/
|
#elif CONFIG_LIBAMR_NB /* Float point version*/
|
||||||
|
|
||||||
typedef struct AMRContext {
|
typedef struct AMRContext {
|
||||||
int frameCount;
|
int frameCount;
|
||||||
@ -492,7 +492,7 @@ static int amr_nb_encode_frame(AVCodecContext *avctx,
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(CONFIG_LIBAMR_NB) || defined(CONFIG_LIBAMR_NB_FIXED)
|
#if CONFIG_LIBAMR_NB || CONFIG_LIBAMR_NB_FIXED
|
||||||
|
|
||||||
AVCodec libamr_nb_decoder =
|
AVCodec libamr_nb_decoder =
|
||||||
{
|
{
|
||||||
@ -524,7 +524,7 @@ AVCodec libamr_nb_encoder =
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* -----------AMR wideband ------------*/
|
/* -----------AMR wideband ------------*/
|
||||||
#ifdef CONFIG_LIBAMR_WB
|
#if CONFIG_LIBAMR_WB
|
||||||
|
|
||||||
#ifdef _TYPEDEF_H
|
#ifdef _TYPEDEF_H
|
||||||
//To avoid duplicate typedefs from typedef in amr-nb
|
//To avoid duplicate typedefs from typedef in amr-nb
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#ifdef CONFIG_LIBDIRAC
|
#if CONFIG_LIBDIRAC
|
||||||
|
|
||||||
#include "avcodec.h"
|
#include "avcodec.h"
|
||||||
#include <libdirac_common/dirac_types.h>
|
#include <libdirac_common/dirac_types.h>
|
||||||
|
@ -35,12 +35,13 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* when CONFIG_LIBFAADBIN is defined the libfaad will be opened at runtime
|
* when CONFIG_LIBFAADBIN is true libfaad will be opened at runtime
|
||||||
*/
|
*/
|
||||||
//#undef CONFIG_LIBFAADBIN
|
//#undef CONFIG_LIBFAADBIN
|
||||||
//#define CONFIG_LIBFAADBIN
|
//#define CONFIG_LIBFAADBIN 0
|
||||||
|
//#define CONFIG_LIBFAADBIN 1
|
||||||
|
|
||||||
#ifdef CONFIG_LIBFAADBIN
|
#if CONFIG_LIBFAADBIN
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
static const char* const libfaadname = "libfaad.so";
|
static const char* const libfaadname = "libfaad.so";
|
||||||
#else
|
#else
|
||||||
@ -224,7 +225,7 @@ static av_cold int faac_decode_init(AVCodecContext *avctx)
|
|||||||
FAACContext *s = avctx->priv_data;
|
FAACContext *s = avctx->priv_data;
|
||||||
faacDecConfigurationPtr faac_cfg;
|
faacDecConfigurationPtr faac_cfg;
|
||||||
|
|
||||||
#ifdef CONFIG_LIBFAADBIN
|
#if CONFIG_LIBFAADBIN
|
||||||
const char* err = 0;
|
const char* err = 0;
|
||||||
|
|
||||||
s->handle = dlopen(libfaadname, RTLD_LAZY);
|
s->handle = dlopen(libfaadname, RTLD_LAZY);
|
||||||
@ -259,7 +260,7 @@ static av_cold int faac_decode_init(AVCodecContext *avctx)
|
|||||||
|
|
||||||
#undef dfaac
|
#undef dfaac
|
||||||
|
|
||||||
#ifdef CONFIG_LIBFAADBIN
|
#if CONFIG_LIBFAADBIN
|
||||||
if (err) {
|
if (err) {
|
||||||
dlclose(s->handle);
|
dlclose(s->handle);
|
||||||
av_log(avctx, AV_LOG_ERROR, "FAAD library: cannot resolve %s in %s!\n",
|
av_log(avctx, AV_LOG_ERROR, "FAAD library: cannot resolve %s in %s!\n",
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#ifdef CONFIG_LIBSCHROEDINGER
|
#if CONFIG_LIBSCHROEDINGER
|
||||||
|
|
||||||
#include <schroedinger/schrobitstream.h>
|
#include <schroedinger/schrobitstream.h>
|
||||||
#include <schroedinger/schroframe.h>
|
#include <schroedinger/schroframe.h>
|
||||||
|
@ -166,9 +166,9 @@ av_cold int ff_xvid_encode_init(AVCodecContext *avctx) {
|
|||||||
xvid_gbl_init.version = XVID_VERSION;
|
xvid_gbl_init.version = XVID_VERSION;
|
||||||
xvid_gbl_init.debug = 0;
|
xvid_gbl_init.debug = 0;
|
||||||
|
|
||||||
#ifdef ARCH_PPC
|
#if ARCH_PPC
|
||||||
/* Xvid's PPC support is borked, use libavcodec to detect */
|
/* Xvid's PPC support is borked, use libavcodec to detect */
|
||||||
#ifdef HAVE_ALTIVEC
|
#if HAVE_ALTIVEC
|
||||||
if( has_altivec() ) {
|
if( has_altivec() ) {
|
||||||
xvid_gbl_init.cpu_flags = XVID_CPU_FORCE | XVID_CPU_ALTIVEC;
|
xvid_gbl_init.cpu_flags = XVID_CPU_FORCE | XVID_CPU_ALTIVEC;
|
||||||
} else
|
} else
|
||||||
|
@ -24,19 +24,19 @@
|
|||||||
|
|
||||||
#include "libavutil/common.h"
|
#include "libavutil/common.h"
|
||||||
|
|
||||||
#ifdef ARCH_X86_32
|
#if ARCH_X86_32
|
||||||
|
|
||||||
#include "x86/mathops.h"
|
#include "x86/mathops.h"
|
||||||
|
|
||||||
#elif defined(ARCH_ARM)
|
#elif ARCH_ARM
|
||||||
|
|
||||||
#include "arm/mathops.h"
|
#include "arm/mathops.h"
|
||||||
|
|
||||||
#elif defined(ARCH_PPC)
|
#elif ARCH_PPC
|
||||||
|
|
||||||
#include "ppc/mathops.h"
|
#include "ppc/mathops.h"
|
||||||
|
|
||||||
#elif defined(ARCH_BFIN)
|
#elif ARCH_BFIN
|
||||||
|
|
||||||
#include "bfin/mathops.h"
|
#include "bfin/mathops.h"
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
#include "bitstream.h"
|
#include "bitstream.h"
|
||||||
#include "dsputil.h"
|
#include "dsputil.h"
|
||||||
|
|
||||||
#ifdef CONFIG_MPEGAUDIO_HP
|
#if CONFIG_MPEGAUDIO_HP
|
||||||
#define USE_HIGHPRECISION
|
#define USE_HIGHPRECISION
|
||||||
#endif
|
#endif
|
||||||
#include "mpegaudio.h"
|
#include "mpegaudio.h"
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
#include "bitstream.h"
|
#include "bitstream.h"
|
||||||
#include "dsputil.h"
|
#include "dsputil.h"
|
||||||
|
|
||||||
#ifdef CONFIG_MPEGAUDIO_HP
|
#if CONFIG_MPEGAUDIO_HP
|
||||||
#define USE_HIGHPRECISION
|
#define USE_HIGHPRECISION
|
||||||
#endif
|
#endif
|
||||||
#include "mpegaudio.h"
|
#include "mpegaudio.h"
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
#include "bitstream.h"
|
#include "bitstream.h"
|
||||||
#include "dsputil.h"
|
#include "dsputil.h"
|
||||||
|
|
||||||
#ifdef CONFIG_MPEGAUDIO_HP
|
#if CONFIG_MPEGAUDIO_HP
|
||||||
#define USE_HIGHPRECISION
|
#define USE_HIGHPRECISION
|
||||||
#endif
|
#endif
|
||||||
#include "mpegaudio.h"
|
#include "mpegaudio.h"
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
#include "bitstream.h"
|
#include "bitstream.h"
|
||||||
#include "dsputil.h"
|
#include "dsputil.h"
|
||||||
|
|
||||||
#ifdef CONFIG_MPEGAUDIO_HP
|
#if CONFIG_MPEGAUDIO_HP
|
||||||
#define USE_HIGHPRECISION
|
#define USE_HIGHPRECISION
|
||||||
#endif
|
#endif
|
||||||
#include "mpegaudio.h"
|
#include "mpegaudio.h"
|
||||||
|
@ -303,7 +303,7 @@ static int mpeg_decode_mb(MpegEncContext *s,
|
|||||||
}else
|
}else
|
||||||
memset(s->last_mv, 0, sizeof(s->last_mv)); /* reset mv prediction */
|
memset(s->last_mv, 0, sizeof(s->last_mv)); /* reset mv prediction */
|
||||||
s->mb_intra = 1;
|
s->mb_intra = 1;
|
||||||
#ifdef CONFIG_XVMC
|
#if CONFIG_XVMC
|
||||||
//if 1, we memcpy blocks in xvmcvideo
|
//if 1, we memcpy blocks in xvmcvideo
|
||||||
if(s->avctx->xvmc_acceleration > 1){
|
if(s->avctx->xvmc_acceleration > 1){
|
||||||
XVMC_pack_pblocks(s,-1);//inter are always full blocks
|
XVMC_pack_pblocks(s,-1);//inter are always full blocks
|
||||||
@ -516,7 +516,7 @@ static int mpeg_decode_mb(MpegEncContext *s,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_XVMC
|
#if CONFIG_XVMC
|
||||||
//if 1, we memcpy blocks in xvmcvideo
|
//if 1, we memcpy blocks in xvmcvideo
|
||||||
if(s->avctx->xvmc_acceleration > 1){
|
if(s->avctx->xvmc_acceleration > 1){
|
||||||
XVMC_pack_pblocks(s,cbp);
|
XVMC_pack_pblocks(s,cbp);
|
||||||
@ -1644,7 +1644,7 @@ static int mpeg_field_start(MpegEncContext *s){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef CONFIG_XVMC
|
#if CONFIG_XVMC
|
||||||
// MPV_frame_start will call this function too,
|
// MPV_frame_start will call this function too,
|
||||||
// but we need to call it on every field
|
// but we need to call it on every field
|
||||||
if(s->avctx->xvmc_acceleration)
|
if(s->avctx->xvmc_acceleration)
|
||||||
@ -1735,7 +1735,7 @@ static int mpeg_decode_slice(Mpeg1Context *s1, int mb_y,
|
|||||||
}
|
}
|
||||||
|
|
||||||
for(;;) {
|
for(;;) {
|
||||||
#ifdef CONFIG_XVMC
|
#if CONFIG_XVMC
|
||||||
//If 1, we memcpy blocks in xvmcvideo.
|
//If 1, we memcpy blocks in xvmcvideo.
|
||||||
if(s->avctx->xvmc_acceleration > 1)
|
if(s->avctx->xvmc_acceleration > 1)
|
||||||
XVMC_init_block(s);//set s->block
|
XVMC_init_block(s);//set s->block
|
||||||
@ -1917,7 +1917,7 @@ static int slice_end(AVCodecContext *avctx, AVFrame *pict)
|
|||||||
if (!s1->mpeg_enc_ctx_allocated || !s->current_picture_ptr)
|
if (!s1->mpeg_enc_ctx_allocated || !s->current_picture_ptr)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
#ifdef CONFIG_XVMC
|
#if CONFIG_XVMC
|
||||||
if(s->avctx->xvmc_acceleration)
|
if(s->avctx->xvmc_acceleration)
|
||||||
XVMC_field_end(s);
|
XVMC_field_end(s);
|
||||||
#endif
|
#endif
|
||||||
@ -2473,7 +2473,7 @@ AVCodec mpegvideo_decoder = {
|
|||||||
.long_name= NULL_IF_CONFIG_SMALL("MPEG-1 video"),
|
.long_name= NULL_IF_CONFIG_SMALL("MPEG-1 video"),
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_XVMC
|
#if CONFIG_XVMC
|
||||||
static av_cold int mpeg_mc_decode_init(AVCodecContext *avctx){
|
static av_cold int mpeg_mc_decode_init(AVCodecContext *avctx){
|
||||||
Mpeg1Context *s;
|
Mpeg1Context *s;
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
|
|
||||||
/* define USE_HIGHPRECISION to have a bit exact (but slower) mpeg
|
/* define USE_HIGHPRECISION to have a bit exact (but slower) mpeg
|
||||||
audio decoder */
|
audio decoder */
|
||||||
#ifdef CONFIG_MPEGAUDIO_HP
|
#if CONFIG_MPEGAUDIO_HP
|
||||||
# define USE_HIGHPRECISION
|
# define USE_HIGHPRECISION
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -2322,7 +2322,7 @@ static void flush(AVCodecContext *avctx){
|
|||||||
s->last_buf_size= 0;
|
s->last_buf_size= 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_MP3ADU_DECODER
|
#if CONFIG_MP3ADU_DECODER
|
||||||
static int decode_frame_adu(AVCodecContext * avctx,
|
static int decode_frame_adu(AVCodecContext * avctx,
|
||||||
void *data, int *data_size,
|
void *data, int *data_size,
|
||||||
const uint8_t * buf, int buf_size)
|
const uint8_t * buf, int buf_size)
|
||||||
@ -2372,7 +2372,7 @@ static int decode_frame_adu(AVCodecContext * avctx,
|
|||||||
}
|
}
|
||||||
#endif /* CONFIG_MP3ADU_DECODER */
|
#endif /* CONFIG_MP3ADU_DECODER */
|
||||||
|
|
||||||
#ifdef CONFIG_MP3ON4_DECODER
|
#if CONFIG_MP3ON4_DECODER
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Context for MP3On4 decoder
|
* Context for MP3On4 decoder
|
||||||
@ -2534,7 +2534,7 @@ static int decode_frame_mp3on4(AVCodecContext * avctx,
|
|||||||
}
|
}
|
||||||
#endif /* CONFIG_MP3ON4_DECODER */
|
#endif /* CONFIG_MP3ON4_DECODER */
|
||||||
|
|
||||||
#ifdef CONFIG_MP1_DECODER
|
#if CONFIG_MP1_DECODER
|
||||||
AVCodec mp1_decoder =
|
AVCodec mp1_decoder =
|
||||||
{
|
{
|
||||||
"mp1",
|
"mp1",
|
||||||
@ -2550,7 +2550,7 @@ AVCodec mp1_decoder =
|
|||||||
.long_name= NULL_IF_CONFIG_SMALL("MP1 (MPEG audio layer 1)"),
|
.long_name= NULL_IF_CONFIG_SMALL("MP1 (MPEG audio layer 1)"),
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_MP2_DECODER
|
#if CONFIG_MP2_DECODER
|
||||||
AVCodec mp2_decoder =
|
AVCodec mp2_decoder =
|
||||||
{
|
{
|
||||||
"mp2",
|
"mp2",
|
||||||
@ -2566,7 +2566,7 @@ AVCodec mp2_decoder =
|
|||||||
.long_name= NULL_IF_CONFIG_SMALL("MP2 (MPEG audio layer 2)"),
|
.long_name= NULL_IF_CONFIG_SMALL("MP2 (MPEG audio layer 2)"),
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_MP3_DECODER
|
#if CONFIG_MP3_DECODER
|
||||||
AVCodec mp3_decoder =
|
AVCodec mp3_decoder =
|
||||||
{
|
{
|
||||||
"mp3",
|
"mp3",
|
||||||
@ -2582,7 +2582,7 @@ AVCodec mp3_decoder =
|
|||||||
.long_name= NULL_IF_CONFIG_SMALL("MP3 (MPEG audio layer 3)"),
|
.long_name= NULL_IF_CONFIG_SMALL("MP3 (MPEG audio layer 3)"),
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_MP3ADU_DECODER
|
#if CONFIG_MP3ADU_DECODER
|
||||||
AVCodec mp3adu_decoder =
|
AVCodec mp3adu_decoder =
|
||||||
{
|
{
|
||||||
"mp3adu",
|
"mp3adu",
|
||||||
@ -2598,7 +2598,7 @@ AVCodec mp3adu_decoder =
|
|||||||
.long_name= NULL_IF_CONFIG_SMALL("ADU (Application Data Unit) MP3 (MPEG audio layer 3)"),
|
.long_name= NULL_IF_CONFIG_SMALL("ADU (Application Data Unit) MP3 (MPEG audio layer 3)"),
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_MP3ON4_DECODER
|
#if CONFIG_MP3ON4_DECODER
|
||||||
AVCodec mp3on4_decoder =
|
AVCodec mp3on4_decoder =
|
||||||
{
|
{
|
||||||
"mp3on4",
|
"mp3on4",
|
||||||
|
@ -121,19 +121,19 @@ int ff_dct_common_init(MpegEncContext *s)
|
|||||||
s->dct_unquantize_mpeg2_intra = dct_unquantize_mpeg2_intra_bitexact;
|
s->dct_unquantize_mpeg2_intra = dct_unquantize_mpeg2_intra_bitexact;
|
||||||
s->dct_unquantize_mpeg2_inter = dct_unquantize_mpeg2_inter_c;
|
s->dct_unquantize_mpeg2_inter = dct_unquantize_mpeg2_inter_c;
|
||||||
|
|
||||||
#if defined(HAVE_MMX)
|
#if HAVE_MMX
|
||||||
MPV_common_init_mmx(s);
|
MPV_common_init_mmx(s);
|
||||||
#elif defined(ARCH_ALPHA)
|
#elif ARCH_ALPHA
|
||||||
MPV_common_init_axp(s);
|
MPV_common_init_axp(s);
|
||||||
#elif defined(CONFIG_MLIB)
|
#elif CONFIG_MLIB
|
||||||
MPV_common_init_mlib(s);
|
MPV_common_init_mlib(s);
|
||||||
#elif defined(HAVE_MMI)
|
#elif HAVE_MMI
|
||||||
MPV_common_init_mmi(s);
|
MPV_common_init_mmi(s);
|
||||||
#elif defined(ARCH_ARM)
|
#elif ARCH_ARM
|
||||||
MPV_common_init_arm(s);
|
MPV_common_init_arm(s);
|
||||||
#elif defined(HAVE_ALTIVEC)
|
#elif HAVE_ALTIVEC
|
||||||
MPV_common_init_altivec(s);
|
MPV_common_init_altivec(s);
|
||||||
#elif defined(ARCH_BFIN)
|
#elif ARCH_BFIN
|
||||||
MPV_common_init_bfin(s);
|
MPV_common_init_bfin(s);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -939,7 +939,7 @@ alloc:
|
|||||||
update_noise_reduction(s);
|
update_noise_reduction(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_XVMC
|
#if CONFIG_XVMC
|
||||||
if(s->avctx->xvmc_acceleration)
|
if(s->avctx->xvmc_acceleration)
|
||||||
return XVMC_field_start(s, avctx);
|
return XVMC_field_start(s, avctx);
|
||||||
#endif
|
#endif
|
||||||
@ -951,7 +951,7 @@ void MPV_frame_end(MpegEncContext *s)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
/* draw edge for correct motion prediction if outside */
|
/* draw edge for correct motion prediction if outside */
|
||||||
#ifdef CONFIG_XVMC
|
#if CONFIG_XVMC
|
||||||
//just to make sure that all data is rendered.
|
//just to make sure that all data is rendered.
|
||||||
if(s->avctx->xvmc_acceleration){
|
if(s->avctx->xvmc_acceleration){
|
||||||
XVMC_field_end(s);
|
XVMC_field_end(s);
|
||||||
@ -1736,7 +1736,7 @@ void MPV_decode_mb_internal(MpegEncContext *s, DCTELEM block[12][64],
|
|||||||
{
|
{
|
||||||
int mb_x, mb_y;
|
int mb_x, mb_y;
|
||||||
const int mb_xy = s->mb_y * s->mb_stride + s->mb_x;
|
const int mb_xy = s->mb_y * s->mb_stride + s->mb_x;
|
||||||
#ifdef CONFIG_XVMC
|
#if CONFIG_XVMC
|
||||||
if(s->avctx->xvmc_acceleration){
|
if(s->avctx->xvmc_acceleration){
|
||||||
XVMC_decode_mb(s);//xvmc uses pblocks
|
XVMC_decode_mb(s);//xvmc uses pblocks
|
||||||
return;
|
return;
|
||||||
@ -1974,7 +1974,7 @@ skip_idct:
|
|||||||
}
|
}
|
||||||
|
|
||||||
void MPV_decode_mb(MpegEncContext *s, DCTELEM block[12][64]){
|
void MPV_decode_mb(MpegEncContext *s, DCTELEM block[12][64]){
|
||||||
#ifndef CONFIG_SMALL
|
#if !CONFIG_SMALL
|
||||||
if(s->out_format == FMT_MPEG1) {
|
if(s->out_format == FMT_MPEG1) {
|
||||||
if(s->avctx->lowres) MPV_decode_mb_internal(s, block, 1, 1);
|
if(s->avctx->lowres) MPV_decode_mb_internal(s, block, 1, 1);
|
||||||
else MPV_decode_mb_internal(s, block, 0, 1);
|
else MPV_decode_mb_internal(s, block, 0, 1);
|
||||||
|
@ -371,7 +371,7 @@ void mpeg_motion(MpegEncContext *s,
|
|||||||
uint8_t **ref_picture, op_pixels_func (*pix_op)[4],
|
uint8_t **ref_picture, op_pixels_func (*pix_op)[4],
|
||||||
int motion_x, int motion_y, int h)
|
int motion_x, int motion_y, int h)
|
||||||
{
|
{
|
||||||
#ifndef CONFIG_SMALL
|
#if !CONFIG_SMALL
|
||||||
if(s->out_format == FMT_MPEG1)
|
if(s->out_format == FMT_MPEG1)
|
||||||
mpeg_motion_internal(s, dest_y, dest_cb, dest_cr, field_based,
|
mpeg_motion_internal(s, dest_y, dest_cb, dest_cr, field_based,
|
||||||
bottom_field, field_select, ref_picture, pix_op,
|
bottom_field, field_select, ref_picture, pix_op,
|
||||||
@ -888,7 +888,7 @@ static inline void MPV_motion(MpegEncContext *s,
|
|||||||
op_pixels_func (*pix_op)[4],
|
op_pixels_func (*pix_op)[4],
|
||||||
qpel_mc_func (*qpix_op)[16])
|
qpel_mc_func (*qpix_op)[16])
|
||||||
{
|
{
|
||||||
#ifndef CONFIG_SMALL
|
#if !CONFIG_SMALL
|
||||||
if(s->out_format == FMT_MPEG1)
|
if(s->out_format == FMT_MPEG1)
|
||||||
MPV_motion_internal(s, dest_y, dest_cb, dest_cr, dir,
|
MPV_motion_internal(s, dest_y, dest_cb, dest_cr, dir,
|
||||||
ref_picture, pix_op, qpix_op, 1);
|
ref_picture, pix_op, qpix_op, 1);
|
||||||
|
@ -62,7 +62,7 @@ static uint32_t v2_dc_chroma_table[512][2];
|
|||||||
static int msmpeg4_decode_dc(MpegEncContext * s, int n, int *dir_ptr);
|
static int msmpeg4_decode_dc(MpegEncContext * s, int n, int *dir_ptr);
|
||||||
static void init_h263_dc_for_msmpeg4(void);
|
static void init_h263_dc_for_msmpeg4(void);
|
||||||
static inline void msmpeg4_memsetw(short *tab, int val, int n);
|
static inline void msmpeg4_memsetw(short *tab, int val, int n);
|
||||||
#ifdef CONFIG_ENCODERS
|
#if CONFIG_ENCODERS
|
||||||
static void msmpeg4v2_encode_motion(MpegEncContext * s, int val);
|
static void msmpeg4v2_encode_motion(MpegEncContext * s, int val);
|
||||||
static int get_size_of_code(MpegEncContext * s, RLTable *rl, int last, int run, int level, int intra);
|
static int get_size_of_code(MpegEncContext * s, RLTable *rl, int last, int run, int level, int intra);
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_ENCODERS
|
||||||
@ -79,7 +79,7 @@ int frame_count = 0;
|
|||||||
|
|
||||||
#include "msmpeg4data.h"
|
#include "msmpeg4data.h"
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS //strangely gcc includes this even if it is not references
|
#if CONFIG_ENCODERS //strangely gcc includes this even if it is not referenced
|
||||||
static uint8_t rl_length[NB_RL_TABLES][MAX_LEVEL+1][MAX_RUN+1][2];
|
static uint8_t rl_length[NB_RL_TABLES][MAX_LEVEL+1][MAX_RUN+1][2];
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_ENCODERS
|
||||||
|
|
||||||
@ -109,7 +109,7 @@ static void common_init(MpegEncContext * s)
|
|||||||
s->y_dc_scale_table= wmv1_y_dc_scale_table;
|
s->y_dc_scale_table= wmv1_y_dc_scale_table;
|
||||||
s->c_dc_scale_table= wmv1_c_dc_scale_table;
|
s->c_dc_scale_table= wmv1_c_dc_scale_table;
|
||||||
break;
|
break;
|
||||||
#if defined(CONFIG_WMV3_DECODER)||defined(CONFIG_VC1_DECODER)
|
#if CONFIG_WMV3_DECODER || CONFIG_VC1_DECODER
|
||||||
case 6:
|
case 6:
|
||||||
s->y_dc_scale_table= wmv3_dc_scale_table;
|
s->y_dc_scale_table= wmv3_dc_scale_table;
|
||||||
s->c_dc_scale_table= wmv3_dc_scale_table;
|
s->c_dc_scale_table= wmv3_dc_scale_table;
|
||||||
@ -134,7 +134,7 @@ static void common_init(MpegEncContext * s)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#if CONFIG_ENCODERS
|
||||||
|
|
||||||
/* build the table which associate a (x,y) motion vector to a vlc */
|
/* build the table which associate a (x,y) motion vector to a vlc */
|
||||||
static void init_mv_table(MVTable *tab)
|
static void init_mv_table(MVTable *tab)
|
||||||
@ -411,7 +411,7 @@ int ff_msmpeg4_coded_block_pred(MpegEncContext * s, int n, uint8_t **coded_block
|
|||||||
return pred;
|
return pred;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#if CONFIG_ENCODERS
|
||||||
|
|
||||||
void ff_msmpeg4_encode_motion(MpegEncContext * s,
|
void ff_msmpeg4_encode_motion(MpegEncContext * s,
|
||||||
int mx, int my)
|
int mx, int my)
|
||||||
@ -653,7 +653,7 @@ static inline int msmpeg4_pred_dc(MpegEncContext * s, int n,
|
|||||||
necessitate to modify mpegvideo.c. The problem comes from the
|
necessitate to modify mpegvideo.c. The problem comes from the
|
||||||
fact they decided to store the quantized DC (which would lead
|
fact they decided to store the quantized DC (which would lead
|
||||||
to problems if Q could vary !) */
|
to problems if Q could vary !) */
|
||||||
#if (defined(ARCH_X86)) && !defined PIC
|
#if ARCH_X86 && !defined PIC
|
||||||
__asm__ volatile(
|
__asm__ volatile(
|
||||||
"movl %3, %%eax \n\t"
|
"movl %3, %%eax \n\t"
|
||||||
"shrl $1, %%eax \n\t"
|
"shrl $1, %%eax \n\t"
|
||||||
@ -673,7 +673,7 @@ static inline int msmpeg4_pred_dc(MpegEncContext * s, int n,
|
|||||||
: "%eax", "%edx"
|
: "%eax", "%edx"
|
||||||
);
|
);
|
||||||
#else
|
#else
|
||||||
/* #elif defined (ARCH_ALPHA) */
|
/* #elif ARCH_ALPHA */
|
||||||
/* Divisions are extremely costly on Alpha; optimize the most
|
/* Divisions are extremely costly on Alpha; optimize the most
|
||||||
common case. But they are costly everywhere...
|
common case. But they are costly everywhere...
|
||||||
*/
|
*/
|
||||||
@ -1362,7 +1362,7 @@ static inline void msmpeg4_memsetw(short *tab, int val, int n)
|
|||||||
tab[i] = val;
|
tab[i] = val;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#if CONFIG_ENCODERS
|
||||||
static void msmpeg4v2_encode_motion(MpegEncContext * s, int val)
|
static void msmpeg4v2_encode_motion(MpegEncContext * s, int val)
|
||||||
{
|
{
|
||||||
int range, bit_size, sign, code, bits;
|
int range, bit_size, sign, code, bits;
|
||||||
|
@ -267,7 +267,7 @@ static const AVOption options[]={
|
|||||||
{"vsad", "sum of absolute vertical differences", 0, FF_OPT_TYPE_CONST, FF_CMP_VSAD, INT_MIN, INT_MAX, V|E, "cmp_func"},
|
{"vsad", "sum of absolute vertical differences", 0, FF_OPT_TYPE_CONST, FF_CMP_VSAD, INT_MIN, INT_MAX, V|E, "cmp_func"},
|
||||||
{"vsse","sum of squared vertical differences", 0, FF_OPT_TYPE_CONST, FF_CMP_VSSE, INT_MIN, INT_MAX, V|E, "cmp_func"},
|
{"vsse","sum of squared vertical differences", 0, FF_OPT_TYPE_CONST, FF_CMP_VSSE, INT_MIN, INT_MAX, V|E, "cmp_func"},
|
||||||
{"nsse", "noise preserving sum of squared differences", 0, FF_OPT_TYPE_CONST, FF_CMP_NSSE, INT_MIN, INT_MAX, V|E, "cmp_func"},
|
{"nsse", "noise preserving sum of squared differences", 0, FF_OPT_TYPE_CONST, FF_CMP_NSSE, INT_MIN, INT_MAX, V|E, "cmp_func"},
|
||||||
#ifdef CONFIG_SNOW_ENCODER
|
#if CONFIG_SNOW_ENCODER
|
||||||
{"w53", "5/3 wavelet, only used in snow", 0, FF_OPT_TYPE_CONST, FF_CMP_W53, INT_MIN, INT_MAX, V|E, "cmp_func"},
|
{"w53", "5/3 wavelet, only used in snow", 0, FF_OPT_TYPE_CONST, FF_CMP_W53, INT_MIN, INT_MAX, V|E, "cmp_func"},
|
||||||
{"w97", "9/7 wavelet, only used in snow", 0, FF_OPT_TYPE_CONST, FF_CMP_W97, INT_MIN, INT_MAX, V|E, "cmp_func"},
|
{"w97", "9/7 wavelet, only used in snow", 0, FF_OPT_TYPE_CONST, FF_CMP_W97, INT_MIN, INT_MAX, V|E, "cmp_func"},
|
||||||
#endif
|
#endif
|
||||||
|
@ -507,7 +507,7 @@ static int pcm_decode_frame(AVCodecContext *avctx,
|
|||||||
return src - buf;
|
return src - buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#if CONFIG_ENCODERS
|
||||||
#define PCM_ENCODER(id,sample_fmt_,name,long_name_) \
|
#define PCM_ENCODER(id,sample_fmt_,name,long_name_) \
|
||||||
AVCodec name ## _encoder = { \
|
AVCodec name ## _encoder = { \
|
||||||
#name, \
|
#name, \
|
||||||
@ -525,7 +525,7 @@ AVCodec name ## _encoder = { \
|
|||||||
#define PCM_ENCODER(id,sample_fmt_,name,long_name_)
|
#define PCM_ENCODER(id,sample_fmt_,name,long_name_)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_DECODERS
|
#if CONFIG_DECODERS
|
||||||
#define PCM_DECODER(id,sample_fmt_,name,long_name_) \
|
#define PCM_DECODER(id,sample_fmt_,name,long_name_) \
|
||||||
AVCodec name ## _decoder = { \
|
AVCodec name ## _decoder = { \
|
||||||
#name, \
|
#name, \
|
||||||
|
@ -354,7 +354,7 @@ static int pam_probe(AVProbeData *pd)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef CONFIG_PGM_ENCODER
|
#if CONFIG_PGM_ENCODER
|
||||||
AVCodec pgm_encoder = {
|
AVCodec pgm_encoder = {
|
||||||
"pgm",
|
"pgm",
|
||||||
CODEC_TYPE_VIDEO,
|
CODEC_TYPE_VIDEO,
|
||||||
@ -369,7 +369,7 @@ AVCodec pgm_encoder = {
|
|||||||
};
|
};
|
||||||
#endif // CONFIG_PGM_ENCODER
|
#endif // CONFIG_PGM_ENCODER
|
||||||
|
|
||||||
#ifdef CONFIG_PGMYUV_ENCODER
|
#if CONFIG_PGMYUV_ENCODER
|
||||||
AVCodec pgmyuv_encoder = {
|
AVCodec pgmyuv_encoder = {
|
||||||
"pgmyuv",
|
"pgmyuv",
|
||||||
CODEC_TYPE_VIDEO,
|
CODEC_TYPE_VIDEO,
|
||||||
@ -384,7 +384,7 @@ AVCodec pgmyuv_encoder = {
|
|||||||
};
|
};
|
||||||
#endif // CONFIG_PGMYUV_ENCODER
|
#endif // CONFIG_PGMYUV_ENCODER
|
||||||
|
|
||||||
#ifdef CONFIG_PPM_ENCODER
|
#if CONFIG_PPM_ENCODER
|
||||||
AVCodec ppm_encoder = {
|
AVCodec ppm_encoder = {
|
||||||
"ppm",
|
"ppm",
|
||||||
CODEC_TYPE_VIDEO,
|
CODEC_TYPE_VIDEO,
|
||||||
@ -399,7 +399,7 @@ AVCodec ppm_encoder = {
|
|||||||
};
|
};
|
||||||
#endif // CONFIG_PPM_ENCODER
|
#endif // CONFIG_PPM_ENCODER
|
||||||
|
|
||||||
#ifdef CONFIG_PBM_ENCODER
|
#if CONFIG_PBM_ENCODER
|
||||||
AVCodec pbm_encoder = {
|
AVCodec pbm_encoder = {
|
||||||
"pbm",
|
"pbm",
|
||||||
CODEC_TYPE_VIDEO,
|
CODEC_TYPE_VIDEO,
|
||||||
@ -414,7 +414,7 @@ AVCodec pbm_encoder = {
|
|||||||
};
|
};
|
||||||
#endif // CONFIG_PBM_ENCODER
|
#endif // CONFIG_PBM_ENCODER
|
||||||
|
|
||||||
#ifdef CONFIG_PAM_ENCODER
|
#if CONFIG_PAM_ENCODER
|
||||||
AVCodec pam_encoder = {
|
AVCodec pam_encoder = {
|
||||||
"pam",
|
"pam",
|
||||||
CODEC_TYPE_VIDEO,
|
CODEC_TYPE_VIDEO,
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
#include "dsputil_ppc.h"
|
#include "dsputil_ppc.h"
|
||||||
|
|
||||||
#ifdef HAVE_ALTIVEC
|
#if HAVE_ALTIVEC
|
||||||
#include "dsputil_altivec.h"
|
#include "dsputil_altivec.h"
|
||||||
|
|
||||||
void fdct_altivec(int16_t *block);
|
void fdct_altivec(int16_t *block);
|
||||||
@ -48,7 +48,7 @@ int mm_flags = 0;
|
|||||||
int mm_support(void)
|
int mm_support(void)
|
||||||
{
|
{
|
||||||
int result = 0;
|
int result = 0;
|
||||||
#ifdef HAVE_ALTIVEC
|
#if HAVE_ALTIVEC
|
||||||
if (has_altivec()) {
|
if (has_altivec()) {
|
||||||
result |= FF_MM_ALTIVEC;
|
result |= FF_MM_ALTIVEC;
|
||||||
}
|
}
|
||||||
@ -56,7 +56,7 @@ int mm_support(void)
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_POWERPC_PERF
|
#if CONFIG_POWERPC_PERF
|
||||||
unsigned long long perfdata[POWERPC_NUM_PMC_ENABLED][powerpc_perf_total][powerpc_data_total];
|
unsigned long long perfdata[POWERPC_NUM_PMC_ENABLED][powerpc_perf_total][powerpc_data_total];
|
||||||
/* list below must match enum in dsputil_ppc.h */
|
/* list below must match enum in dsputil_ppc.h */
|
||||||
static unsigned char* perfname[] = {
|
static unsigned char* perfname[] = {
|
||||||
@ -91,7 +91,7 @@ static unsigned char* perfname[] = {
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_POWERPC_PERF
|
#if CONFIG_POWERPC_PERF
|
||||||
void powerpc_display_perf_report(void)
|
void powerpc_display_perf_report(void)
|
||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
@ -165,7 +165,7 @@ POWERPC_PERF_STOP_COUNT(powerpc_clear_blocks_dcbz32, 1);
|
|||||||
|
|
||||||
/* same as above, when dcbzl clear a whole 128B cache line
|
/* same as above, when dcbzl clear a whole 128B cache line
|
||||||
i.e. the PPC970 aka G5 */
|
i.e. the PPC970 aka G5 */
|
||||||
#ifdef HAVE_DCBZL
|
#if HAVE_DCBZL
|
||||||
void clear_blocks_dcbz128_ppc(DCTELEM *blocks)
|
void clear_blocks_dcbz128_ppc(DCTELEM *blocks)
|
||||||
{
|
{
|
||||||
POWERPC_PERF_DECLARE(powerpc_clear_blocks_dcbz128, 1);
|
POWERPC_PERF_DECLARE(powerpc_clear_blocks_dcbz128, 1);
|
||||||
@ -195,7 +195,7 @@ void clear_blocks_dcbz128_ppc(DCTELEM *blocks)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_DCBZL
|
#if HAVE_DCBZL
|
||||||
/* check dcbz report how many bytes are set to 0 by dcbz */
|
/* check dcbz report how many bytes are set to 0 by dcbz */
|
||||||
/* update 24/06/2003 : replace dcbz by dcbzl to get
|
/* update 24/06/2003 : replace dcbz by dcbzl to get
|
||||||
the intended effect (Apple "fixed" dcbz)
|
the intended effect (Apple "fixed" dcbz)
|
||||||
@ -261,7 +261,7 @@ void dsputil_init_ppc(DSPContext* c, AVCodecContext *avctx)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_ALTIVEC
|
#if HAVE_ALTIVEC
|
||||||
if(ENABLE_H264_DECODER) dsputil_h264_init_ppc(c, avctx);
|
if(ENABLE_H264_DECODER) dsputil_h264_init_ppc(c, avctx);
|
||||||
|
|
||||||
if (has_altivec()) {
|
if (has_altivec()) {
|
||||||
@ -275,7 +275,7 @@ void dsputil_init_ppc(DSPContext* c, AVCodecContext *avctx)
|
|||||||
int_init_altivec(c, avctx);
|
int_init_altivec(c, avctx);
|
||||||
c->gmc1 = gmc1_altivec;
|
c->gmc1 = gmc1_altivec;
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#if CONFIG_ENCODERS
|
||||||
if (avctx->dct_algo == FF_DCT_AUTO ||
|
if (avctx->dct_algo == FF_DCT_AUTO ||
|
||||||
avctx->dct_algo == FF_DCT_ALTIVEC) {
|
avctx->dct_algo == FF_DCT_ALTIVEC) {
|
||||||
c->fdct = fdct_altivec;
|
c->fdct = fdct_altivec;
|
||||||
@ -291,7 +291,7 @@ void dsputil_init_ppc(DSPContext* c, AVCodecContext *avctx)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_POWERPC_PERF
|
#if CONFIG_POWERPC_PERF
|
||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
for (i = 0 ; i < powerpc_perf_total ; i++) {
|
for (i = 0 ; i < powerpc_perf_total ; i++) {
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
#ifndef AVCODEC_PPC_DSPUTIL_PPC_H
|
#ifndef AVCODEC_PPC_DSPUTIL_PPC_H
|
||||||
#define AVCODEC_PPC_DSPUTIL_PPC_H
|
#define AVCODEC_PPC_DSPUTIL_PPC_H
|
||||||
|
|
||||||
#ifdef CONFIG_POWERPC_PERF
|
#if CONFIG_POWERPC_PERF
|
||||||
void powerpc_display_perf_report(void);
|
void powerpc_display_perf_report(void);
|
||||||
/* the 604* have 2, the G3* have 4, the G4s have 6,
|
/* the 604* have 2, the G3* have 4, the G4s have 6,
|
||||||
and the G5 are completely different (they MUST use
|
and the G5 are completely different (they MUST use
|
||||||
@ -68,7 +68,7 @@ enum powerpc_data_index {
|
|||||||
};
|
};
|
||||||
extern unsigned long long perfdata[POWERPC_NUM_PMC_ENABLED][powerpc_perf_total][powerpc_data_total];
|
extern unsigned long long perfdata[POWERPC_NUM_PMC_ENABLED][powerpc_perf_total][powerpc_data_total];
|
||||||
|
|
||||||
#ifndef HAVE_PPC64
|
#if !HAVE_PPC64
|
||||||
#define POWERP_PMC_DATATYPE unsigned long
|
#define POWERP_PMC_DATATYPE unsigned long
|
||||||
#define POWERPC_GET_PMC1(a) __asm__ volatile("mfspr %0, 937" : "=r" (a))
|
#define POWERPC_GET_PMC1(a) __asm__ volatile("mfspr %0, 937" : "=r" (a))
|
||||||
#define POWERPC_GET_PMC2(a) __asm__ volatile("mfspr %0, 938" : "=r" (a))
|
#define POWERPC_GET_PMC2(a) __asm__ volatile("mfspr %0, 938" : "=r" (a))
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#ifdef HAVE_ALTIVEC_H
|
#if HAVE_ALTIVEC_H
|
||||||
#include <altivec.h>
|
#include <altivec.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -161,7 +161,7 @@ void idct_put_altivec(uint8_t* dest, int stride, vec_s16* block)
|
|||||||
POWERPC_PERF_DECLARE(altivec_idct_put_num, 1);
|
POWERPC_PERF_DECLARE(altivec_idct_put_num, 1);
|
||||||
vec_u8 tmp;
|
vec_u8 tmp;
|
||||||
|
|
||||||
#ifdef CONFIG_POWERPC_PERF
|
#if CONFIG_POWERPC_PERF
|
||||||
POWERPC_PERF_START_COUNT(altivec_idct_put_num, 1);
|
POWERPC_PERF_START_COUNT(altivec_idct_put_num, 1);
|
||||||
#endif
|
#endif
|
||||||
IDCT
|
IDCT
|
||||||
@ -192,7 +192,7 @@ POWERPC_PERF_DECLARE(altivec_idct_add_num, 1);
|
|||||||
vec_u8 perm1;
|
vec_u8 perm1;
|
||||||
vec_u8 p0, p1, p;
|
vec_u8 p0, p1, p;
|
||||||
|
|
||||||
#ifdef CONFIG_POWERPC_PERF
|
#if CONFIG_POWERPC_PERF
|
||||||
POWERPC_PERF_START_COUNT(altivec_idct_add_num, 1);
|
POWERPC_PERF_START_COUNT(altivec_idct_add_num, 1);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
#ifndef AVCODEC_PPC_MATHOPS_H
|
#ifndef AVCODEC_PPC_MATHOPS_H
|
||||||
#define AVCODEC_PPC_MATHOPS_H
|
#define AVCODEC_PPC_MATHOPS_H
|
||||||
|
|
||||||
#if defined(ARCH_PPC_405)
|
#if ARCH_PPC_405
|
||||||
/* signed 16x16 -> 32 multiply add accumulate */
|
/* signed 16x16 -> 32 multiply add accumulate */
|
||||||
#define MAC16(rt, ra, rb) \
|
#define MAC16(rt, ra, rb) \
|
||||||
__asm__ ("maclhw %0, %2, %3" : "=r" (rt) : "0" (rt), "r" (ra), "r" (rb));
|
__asm__ ("maclhw %0, %2, %3" : "=r" (rt) : "0" (rt), "r" (ra), "r" (rb));
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#ifdef HAVE_ALTIVEC_H
|
#if HAVE_ALTIVEC_H
|
||||||
#include <altivec.h>
|
#include <altivec.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
#include "bitstream.h"
|
#include "bitstream.h"
|
||||||
#include "dsputil.h"
|
#include "dsputil.h"
|
||||||
|
|
||||||
#ifdef CONFIG_MPEGAUDIO_HP
|
#if CONFIG_MPEGAUDIO_HP
|
||||||
#define USE_HIGHPRECISION
|
#define USE_HIGHPRECISION
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -184,7 +184,7 @@ int ff_rate_control_init(MpegEncContext *s)
|
|||||||
|
|
||||||
//FIXME maybe move to end
|
//FIXME maybe move to end
|
||||||
if((s->flags&CODEC_FLAG_PASS2) && s->avctx->rc_strategy == FF_RC_STRATEGY_XVID) {
|
if((s->flags&CODEC_FLAG_PASS2) && s->avctx->rc_strategy == FF_RC_STRATEGY_XVID) {
|
||||||
#ifdef CONFIG_LIBXVID
|
#if CONFIG_LIBXVID
|
||||||
return ff_xvid_rate_control_init(s);
|
return ff_xvid_rate_control_init(s);
|
||||||
#else
|
#else
|
||||||
av_log(s->avctx, AV_LOG_ERROR, "Xvid ratecontrol requires libavcodec compiled with Xvid support.\n");
|
av_log(s->avctx, AV_LOG_ERROR, "Xvid ratecontrol requires libavcodec compiled with Xvid support.\n");
|
||||||
@ -260,7 +260,7 @@ void ff_rate_control_uninit(MpegEncContext *s)
|
|||||||
ff_eval_free(rcc->rc_eq_eval);
|
ff_eval_free(rcc->rc_eq_eval);
|
||||||
av_freep(&rcc->entry);
|
av_freep(&rcc->entry);
|
||||||
|
|
||||||
#ifdef CONFIG_LIBXVID
|
#if CONFIG_LIBXVID
|
||||||
if((s->flags&CODEC_FLAG_PASS2) && s->avctx->rc_strategy == FF_RC_STRATEGY_XVID)
|
if((s->flags&CODEC_FLAG_PASS2) && s->avctx->rc_strategy == FF_RC_STRATEGY_XVID)
|
||||||
ff_xvid_rate_control_uninit(s);
|
ff_xvid_rate_control_uninit(s);
|
||||||
#endif
|
#endif
|
||||||
@ -678,7 +678,7 @@ float ff_rate_estimate_qscale(MpegEncContext *s, int dry_run)
|
|||||||
Picture * const pic= &s->current_picture;
|
Picture * const pic= &s->current_picture;
|
||||||
emms_c();
|
emms_c();
|
||||||
|
|
||||||
#ifdef CONFIG_LIBXVID
|
#if CONFIG_LIBXVID
|
||||||
if((s->flags&CODEC_FLAG_PASS2) && s->avctx->rc_strategy == FF_RC_STRATEGY_XVID)
|
if((s->flags&CODEC_FLAG_PASS2) && s->avctx->rc_strategy == FF_RC_STRATEGY_XVID)
|
||||||
return ff_xvid_rate_estimate_qscale(s, dry_run);
|
return ff_xvid_rate_estimate_qscale(s, dry_run);
|
||||||
#endif
|
#endif
|
||||||
|
@ -64,7 +64,7 @@ static av_always_inline void fill_rectangle(void *vp, int w, int h, int stride,
|
|||||||
*(uint32_t*)(p + 3*stride)= v;
|
*(uint32_t*)(p + 3*stride)= v;
|
||||||
}else if(w==8){
|
}else if(w==8){
|
||||||
//gcc can't optimize 64bit math on x86_32
|
//gcc can't optimize 64bit math on x86_32
|
||||||
#ifdef HAVE_FAST_64BIT
|
#if HAVE_FAST_64BIT
|
||||||
const uint64_t v= val*0x0100000001ULL;
|
const uint64_t v= val*0x0100000001ULL;
|
||||||
*(uint64_t*)(p + 0*stride)= v;
|
*(uint64_t*)(p + 0*stride)= v;
|
||||||
if(h==1) return;
|
if(h==1) return;
|
||||||
|
@ -230,7 +230,7 @@ int rv_decode_dc(MpegEncContext *s, int n)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#if defined(CONFIG_RV10_ENCODER) || defined(CONFIG_RV20_ENCODER)
|
#if CONFIG_RV10_ENCODER || CONFIG_RV20_ENCODER
|
||||||
/* write RV 1.0 compatible frame header */
|
/* write RV 1.0 compatible frame header */
|
||||||
void rv10_encode_picture_header(MpegEncContext *s, int picture_number)
|
void rv10_encode_picture_header(MpegEncContext *s, int picture_number)
|
||||||
{
|
{
|
||||||
@ -304,7 +304,7 @@ static int get_num(GetBitContext *gb)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* defined(CONFIG_RV10_ENCODER) || defined(CONFIG_RV20_ENCODER) */
|
#endif /* CONFIG_RV10_ENCODER || CONFIG_RV20_ENCODER */
|
||||||
|
|
||||||
/* read RV 1.0 compatible frame header */
|
/* read RV 1.0 compatible frame header */
|
||||||
static int rv10_decode_picture_header(MpegEncContext *s)
|
static int rv10_decode_picture_header(MpegEncContext *s)
|
||||||
|
@ -59,13 +59,13 @@
|
|||||||
static inline void idctRowCondDC (DCTELEM * row)
|
static inline void idctRowCondDC (DCTELEM * row)
|
||||||
{
|
{
|
||||||
int a0, a1, a2, a3, b0, b1, b2, b3;
|
int a0, a1, a2, a3, b0, b1, b2, b3;
|
||||||
#ifdef HAVE_FAST_64BIT
|
#if HAVE_FAST_64BIT
|
||||||
uint64_t temp;
|
uint64_t temp;
|
||||||
#else
|
#else
|
||||||
uint32_t temp;
|
uint32_t temp;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_FAST_64BIT
|
#if HAVE_FAST_64BIT
|
||||||
#ifdef WORDS_BIGENDIAN
|
#ifdef WORDS_BIGENDIAN
|
||||||
#define ROW0_MASK 0xffff000000000000LL
|
#define ROW0_MASK 0xffff000000000000LL
|
||||||
#else
|
#else
|
||||||
@ -127,7 +127,7 @@ static inline void idctRowCondDC (DCTELEM * row)
|
|||||||
b3 = MUL16(W7, row[1]);
|
b3 = MUL16(W7, row[1]);
|
||||||
MAC16(b3, -W5, row[3]);
|
MAC16(b3, -W5, row[3]);
|
||||||
|
|
||||||
#ifdef HAVE_FAST_64BIT
|
#if HAVE_FAST_64BIT
|
||||||
temp = ((uint64_t*)row)[1];
|
temp = ((uint64_t*)row)[1];
|
||||||
#else
|
#else
|
||||||
temp = ((uint32_t*)row)[2] | ((uint32_t*)row)[3];
|
temp = ((uint32_t*)row)[2] | ((uint32_t*)row)[3];
|
||||||
|
@ -4670,7 +4670,7 @@ AVCodec snow_decoder = {
|
|||||||
.long_name = NULL_IF_CONFIG_SMALL("Snow"),
|
.long_name = NULL_IF_CONFIG_SMALL("Snow"),
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_SNOW_ENCODER
|
#if CONFIG_SNOW_ENCODER
|
||||||
AVCodec snow_encoder = {
|
AVCodec snow_encoder = {
|
||||||
"snow",
|
"snow",
|
||||||
CODEC_TYPE_VIDEO,
|
CODEC_TYPE_VIDEO,
|
||||||
|
@ -125,7 +125,7 @@ void ff_snow_vertical_compose97i(IDWTELEM *b0, IDWTELEM *b1, IDWTELEM *b2, IDWTE
|
|||||||
void ff_snow_horizontal_compose97i(IDWTELEM *b, int width);
|
void ff_snow_horizontal_compose97i(IDWTELEM *b, int width);
|
||||||
void ff_snow_inner_add_yblock(const uint8_t *obmc, const int obmc_stride, uint8_t * * block, int b_w, int b_h, int src_x, int src_y, int src_stride, slice_buffer * sb, int add, uint8_t * dst8);
|
void ff_snow_inner_add_yblock(const uint8_t *obmc, const int obmc_stride, uint8_t * * block, int b_w, int b_h, int src_x, int src_y, int src_stride, slice_buffer * sb, int add, uint8_t * dst8);
|
||||||
|
|
||||||
#ifdef CONFIG_SNOW_ENCODER
|
#if CONFIG_SNOW_ENCODER
|
||||||
int w53_32_c(void *v, uint8_t * pix1, uint8_t * pix2, int line_size, int h);
|
int w53_32_c(void *v, uint8_t * pix1, uint8_t * pix2, int line_size, int h);
|
||||||
int w97_32_c(void *v, uint8_t * pix1, uint8_t * pix2, int line_size, int h);
|
int w97_32_c(void *v, uint8_t * pix1, uint8_t * pix2, int line_size, int h);
|
||||||
#else
|
#else
|
||||||
|
@ -408,7 +408,7 @@ static int predictor_calc_error(int *k, int *state, int order, int error)
|
|||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(CONFIG_SONIC_ENCODER) || defined(CONFIG_SONIC_LS_ENCODER)
|
#if CONFIG_SONIC_ENCODER || CONFIG_SONIC_LS_ENCODER
|
||||||
// Heavily modified Levinson-Durbin algorithm which
|
// Heavily modified Levinson-Durbin algorithm which
|
||||||
// copes better with quantization, and calculates the
|
// copes better with quantization, and calculates the
|
||||||
// actual whitened result as it goes.
|
// actual whitened result as it goes.
|
||||||
@ -479,12 +479,12 @@ static void modified_levinson_durbin(int *window, int window_entries,
|
|||||||
|
|
||||||
av_free(state);
|
av_free(state);
|
||||||
}
|
}
|
||||||
#endif /* defined(CONFIG_SONIC_ENCODER) || defined(CONFIG_SONIC_LS_ENCODER) */
|
#endif /* CONFIG_SONIC_ENCODER || CONFIG_SONIC_LS_ENCODER */
|
||||||
|
|
||||||
static const int samplerate_table[] =
|
static const int samplerate_table[] =
|
||||||
{ 44100, 22050, 11025, 96000, 48000, 32000, 24000, 16000, 8000 };
|
{ 44100, 22050, 11025, 96000, 48000, 32000, 24000, 16000, 8000 };
|
||||||
|
|
||||||
#if defined(CONFIG_SONIC_ENCODER) || defined(CONFIG_SONIC_LS_ENCODER)
|
#if CONFIG_SONIC_ENCODER || CONFIG_SONIC_LS_ENCODER
|
||||||
static inline int code_samplerate(int samplerate)
|
static inline int code_samplerate(int samplerate)
|
||||||
{
|
{
|
||||||
switch (samplerate)
|
switch (samplerate)
|
||||||
@ -747,9 +747,9 @@ static int sonic_encode_frame(AVCodecContext *avctx,
|
|||||||
flush_put_bits(&pb);
|
flush_put_bits(&pb);
|
||||||
return (put_bits_count(&pb)+7)/8;
|
return (put_bits_count(&pb)+7)/8;
|
||||||
}
|
}
|
||||||
#endif /* defined(CONFIG_SONIC_ENCODER) || defined(CONFIG_SONIC_LS_ENCODER) */
|
#endif /* CONFIG_SONIC_ENCODER || CONFIG_SONIC_LS_ENCODER */
|
||||||
|
|
||||||
#ifdef CONFIG_SONIC_DECODER
|
#if CONFIG_SONIC_DECODER
|
||||||
static av_cold int sonic_decode_init(AVCodecContext *avctx)
|
static av_cold int sonic_decode_init(AVCodecContext *avctx)
|
||||||
{
|
{
|
||||||
SonicContext *s = avctx->priv_data;
|
SonicContext *s = avctx->priv_data;
|
||||||
@ -936,7 +936,7 @@ static int sonic_decode_frame(AVCodecContext *avctx,
|
|||||||
}
|
}
|
||||||
#endif /* CONFIG_SONIC_DECODER */
|
#endif /* CONFIG_SONIC_DECODER */
|
||||||
|
|
||||||
#ifdef CONFIG_SONIC_ENCODER
|
#if CONFIG_SONIC_ENCODER
|
||||||
AVCodec sonic_encoder = {
|
AVCodec sonic_encoder = {
|
||||||
"sonic",
|
"sonic",
|
||||||
CODEC_TYPE_AUDIO,
|
CODEC_TYPE_AUDIO,
|
||||||
@ -950,7 +950,7 @@ AVCodec sonic_encoder = {
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_SONIC_LS_ENCODER
|
#if CONFIG_SONIC_LS_ENCODER
|
||||||
AVCodec sonic_ls_encoder = {
|
AVCodec sonic_ls_encoder = {
|
||||||
"sonicls",
|
"sonicls",
|
||||||
CODEC_TYPE_AUDIO,
|
CODEC_TYPE_AUDIO,
|
||||||
@ -964,7 +964,7 @@ AVCodec sonic_ls_encoder = {
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_SONIC_DECODER
|
#if CONFIG_SONIC_DECODER
|
||||||
AVCodec sonic_decoder = {
|
AVCodec sonic_decoder = {
|
||||||
"sonic",
|
"sonic",
|
||||||
CODEC_TYPE_AUDIO,
|
CODEC_TYPE_AUDIO,
|
||||||
|
@ -119,7 +119,7 @@ static void svq1_write_header(SVQ1Context *s, int frame_type)
|
|||||||
#define QUALITY_THRESHOLD 100
|
#define QUALITY_THRESHOLD 100
|
||||||
#define THRESHOLD_MULTIPLIER 0.6
|
#define THRESHOLD_MULTIPLIER 0.6
|
||||||
|
|
||||||
#if defined(HAVE_ALTIVEC)
|
#if HAVE_ALTIVEC
|
||||||
#undef vector
|
#undef vector
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
* http://samples.mplayerhq.hu/V-codecs/SVQ3/Vertical400kbit.sorenson3.mov
|
* http://samples.mplayerhq.hu/V-codecs/SVQ3/Vertical400kbit.sorenson3.mov
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef CONFIG_ZLIB
|
#if CONFIG_ZLIB
|
||||||
#include <zlib.h>
|
#include <zlib.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -849,7 +849,7 @@ static int svq3_decode_init(AVCodecContext *avctx)
|
|||||||
h->unknown_svq3_flag = get_bits1(&gb);
|
h->unknown_svq3_flag = get_bits1(&gb);
|
||||||
avctx->has_b_frames = !s->low_delay;
|
avctx->has_b_frames = !s->low_delay;
|
||||||
if (h->unknown_svq3_flag) {
|
if (h->unknown_svq3_flag) {
|
||||||
#ifdef CONFIG_ZLIB
|
#if CONFIG_ZLIB
|
||||||
unsigned watermark_width = svq3_get_ue_golomb(&gb);
|
unsigned watermark_width = svq3_get_ue_golomb(&gb);
|
||||||
unsigned watermark_height = svq3_get_ue_golomb(&gb);
|
unsigned watermark_height = svq3_get_ue_golomb(&gb);
|
||||||
int u1 = svq3_get_ue_golomb(&gb);
|
int u1 = svq3_get_ue_golomb(&gb);
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
* @author Konstantin Shishkov
|
* @author Konstantin Shishkov
|
||||||
*/
|
*/
|
||||||
#include "avcodec.h"
|
#include "avcodec.h"
|
||||||
#ifdef CONFIG_ZLIB
|
#if CONFIG_ZLIB
|
||||||
#include <zlib.h>
|
#include <zlib.h>
|
||||||
#endif
|
#endif
|
||||||
#include "lzw.h"
|
#include "lzw.h"
|
||||||
@ -78,7 +78,7 @@ static int tiff_unpack_strip(TiffContext *s, uint8_t* dst, int stride, const uin
|
|||||||
int c, line, pixels, code;
|
int c, line, pixels, code;
|
||||||
const uint8_t *ssrc = src;
|
const uint8_t *ssrc = src;
|
||||||
int width = s->width * s->bpp >> 3;
|
int width = s->width * s->bpp >> 3;
|
||||||
#ifdef CONFIG_ZLIB
|
#if CONFIG_ZLIB
|
||||||
uint8_t *zbuf; unsigned long outlen;
|
uint8_t *zbuf; unsigned long outlen;
|
||||||
|
|
||||||
if(s->compr == TIFF_DEFLATE || s->compr == TIFF_ADOBE_DEFLATE){
|
if(s->compr == TIFF_DEFLATE || s->compr == TIFF_ADOBE_DEFLATE){
|
||||||
@ -298,7 +298,7 @@ static int tiff_decode_tag(TiffContext *s, const uint8_t *start, const uint8_t *
|
|||||||
break;
|
break;
|
||||||
case TIFF_DEFLATE:
|
case TIFF_DEFLATE:
|
||||||
case TIFF_ADOBE_DEFLATE:
|
case TIFF_ADOBE_DEFLATE:
|
||||||
#ifdef CONFIG_ZLIB
|
#if CONFIG_ZLIB
|
||||||
break;
|
break;
|
||||||
#else
|
#else
|
||||||
av_log(s->avctx, AV_LOG_ERROR, "Deflate: ZLib not compiled in\n");
|
av_log(s->avctx, AV_LOG_ERROR, "Deflate: ZLib not compiled in\n");
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
* @author Bartlomiej Wolowiec
|
* @author Bartlomiej Wolowiec
|
||||||
*/
|
*/
|
||||||
#include "avcodec.h"
|
#include "avcodec.h"
|
||||||
#ifdef CONFIG_ZLIB
|
#if CONFIG_ZLIB
|
||||||
#include <zlib.h>
|
#include <zlib.h>
|
||||||
#endif
|
#endif
|
||||||
#include "bytestream.h"
|
#include "bytestream.h"
|
||||||
@ -151,7 +151,7 @@ static int encode_strip(TiffEncoderContext * s, const int8_t * src,
|
|||||||
{
|
{
|
||||||
|
|
||||||
switch (compr) {
|
switch (compr) {
|
||||||
#ifdef CONFIG_ZLIB
|
#if CONFIG_ZLIB
|
||||||
case TIFF_DEFLATE:
|
case TIFF_DEFLATE:
|
||||||
case TIFF_ADOBE_DEFLATE:
|
case TIFF_ADOBE_DEFLATE:
|
||||||
{
|
{
|
||||||
@ -229,7 +229,7 @@ static int encode_frame(AVCodecContext * avctx, unsigned char *buf,
|
|||||||
s->compr = TIFF_RAW;
|
s->compr = TIFF_RAW;
|
||||||
} else if(avctx->compression_level == 2) {
|
} else if(avctx->compression_level == 2) {
|
||||||
s->compr = TIFF_LZW;
|
s->compr = TIFF_LZW;
|
||||||
#ifdef CONFIG_ZLIB
|
#if CONFIG_ZLIB
|
||||||
} else if ((avctx->compression_level >= 3)) {
|
} else if ((avctx->compression_level >= 3)) {
|
||||||
s->compr = TIFF_DEFLATE;
|
s->compr = TIFF_DEFLATE;
|
||||||
#endif
|
#endif
|
||||||
@ -315,7 +315,7 @@ static int encode_frame(AVCodecContext * avctx, unsigned char *buf,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_ZLIB
|
#if CONFIG_ZLIB
|
||||||
if (s->compr == TIFF_DEFLATE || s->compr == TIFF_ADOBE_DEFLATE) {
|
if (s->compr == TIFF_DEFLATE || s->compr == TIFF_ADOBE_DEFLATE) {
|
||||||
uint8_t *zbuf;
|
uint8_t *zbuf;
|
||||||
int zlen, zn;
|
int zlen, zn;
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <float.h>
|
#include <float.h>
|
||||||
#if !defined(HAVE_MKSTEMP)
|
#if !HAVE_MKSTEMP
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -251,7 +251,7 @@ int avcodec_default_get_buffer(AVCodecContext *s, AVFrame *pic){
|
|||||||
//we could change STRIDE_ALIGN to 16 for x86/sse but it would increase the
|
//we could change STRIDE_ALIGN to 16 for x86/sse but it would increase the
|
||||||
//picture size unneccessarily in some cases. The solution here is not
|
//picture size unneccessarily in some cases. The solution here is not
|
||||||
//pretty and better ideas are welcome!
|
//pretty and better ideas are welcome!
|
||||||
#ifdef HAVE_MMX
|
#if HAVE_MMX
|
||||||
if(s->codec_id == CODEC_ID_SVQ1)
|
if(s->codec_id == CODEC_ID_SVQ1)
|
||||||
stride_align[i]= 16;
|
stride_align[i]= 16;
|
||||||
else
|
else
|
||||||
@ -900,7 +900,7 @@ int av_get_bits_per_sample_format(enum SampleFormat sample_fmt) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(HAVE_THREADS)
|
#if !HAVE_THREADS
|
||||||
int avcodec_thread_init(AVCodecContext *s, int thread_count){
|
int avcodec_thread_init(AVCodecContext *s, int thread_count){
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -927,7 +927,7 @@ unsigned int av_xiphlacing(unsigned char *s, unsigned int v)
|
|||||||
* and opened file name in **filename. */
|
* and opened file name in **filename. */
|
||||||
int av_tempfile(char *prefix, char **filename) {
|
int av_tempfile(char *prefix, char **filename) {
|
||||||
int fd=-1;
|
int fd=-1;
|
||||||
#if !defined(HAVE_MKSTEMP)
|
#if !HAVE_MKSTEMP
|
||||||
*filename = tempnam(".", prefix);
|
*filename = tempnam(".", prefix);
|
||||||
#else
|
#else
|
||||||
size_t len = strlen(prefix) + 12; /* room for "/tmp/" and "XXXXXX\0" */
|
size_t len = strlen(prefix) + 12; /* room for "/tmp/" and "XXXXXX\0" */
|
||||||
@ -938,7 +938,7 @@ int av_tempfile(char *prefix, char **filename) {
|
|||||||
av_log(NULL, AV_LOG_ERROR, "ff_tempfile: Cannot allocate file name\n");
|
av_log(NULL, AV_LOG_ERROR, "ff_tempfile: Cannot allocate file name\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
#if !defined(HAVE_MKSTEMP)
|
#if !HAVE_MKSTEMP
|
||||||
fd = open(*filename, O_RDWR | O_BINARY | O_CREAT, 0444);
|
fd = open(*filename, O_RDWR | O_BINARY | O_CREAT, 0444);
|
||||||
#else
|
#else
|
||||||
snprintf(*filename, len, "/tmp/%sXXXXXX", prefix);
|
snprintf(*filename, len, "/tmp/%sXXXXXX", prefix);
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
|
|
||||||
/* Disable the encoder. */
|
/* Disable the encoder. */
|
||||||
#undef CONFIG_VCR1_ENCODER
|
#undef CONFIG_VCR1_ENCODER
|
||||||
|
#define CONFIG_VCR1_ENCODER 0
|
||||||
|
|
||||||
typedef struct VCR1Context{
|
typedef struct VCR1Context{
|
||||||
AVCodecContext *avctx;
|
AVCodecContext *avctx;
|
||||||
@ -116,7 +117,7 @@ static int decode_frame(AVCodecContext *avctx,
|
|||||||
return buf_size;
|
return buf_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_VCR1_ENCODER
|
#if CONFIG_VCR1_ENCODER
|
||||||
static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data){
|
static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data){
|
||||||
VCR1Context * const a = avctx->priv_data;
|
VCR1Context * const a = avctx->priv_data;
|
||||||
AVFrame *pict = data;
|
AVFrame *pict = data;
|
||||||
@ -156,7 +157,7 @@ static av_cold int decode_init(AVCodecContext *avctx){
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_VCR1_ENCODER
|
#if CONFIG_VCR1_ENCODER
|
||||||
static av_cold int encode_init(AVCodecContext *avctx){
|
static av_cold int encode_init(AVCodecContext *avctx){
|
||||||
|
|
||||||
common_init(avctx);
|
common_init(avctx);
|
||||||
@ -178,7 +179,7 @@ AVCodec vcr1_decoder = {
|
|||||||
.long_name = NULL_IF_CONFIG_SMALL("ATI VCR1"),
|
.long_name = NULL_IF_CONFIG_SMALL("ATI VCR1"),
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_VCR1_ENCODER
|
#if CONFIG_VCR1_ENCODER
|
||||||
AVCodec vcr1_encoder = {
|
AVCodec vcr1_encoder = {
|
||||||
"vcr1",
|
"vcr1",
|
||||||
CODEC_TYPE_VIDEO,
|
CODEC_TYPE_VIDEO,
|
||||||
|
@ -2021,7 +2021,7 @@ static int read_huffman_tree(AVCodecContext *avctx, GetBitContext *gb)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_THEORA_DECODER
|
#if CONFIG_THEORA_DECODER
|
||||||
static int theora_decode_header(AVCodecContext *avctx, GetBitContext *gb)
|
static int theora_decode_header(AVCodecContext *avctx, GetBitContext *gb)
|
||||||
{
|
{
|
||||||
Vp3DecodeContext *s = avctx->priv_data;
|
Vp3DecodeContext *s = avctx->priv_data;
|
||||||
|
@ -44,7 +44,7 @@ int mm_support(void)
|
|||||||
int max_std_level, max_ext_level, std_caps=0, ext_caps=0;
|
int max_std_level, max_ext_level, std_caps=0, ext_caps=0;
|
||||||
x86_reg a, c;
|
x86_reg a, c;
|
||||||
|
|
||||||
#ifdef ARCH_X86_64
|
#if ARCH_X86_64
|
||||||
#define PUSHF "pushfq\n\t"
|
#define PUSHF "pushfq\n\t"
|
||||||
#define POPF "popfq\n\t"
|
#define POPF "popfq\n\t"
|
||||||
#else
|
#else
|
||||||
@ -83,7 +83,7 @@ int mm_support(void)
|
|||||||
rval |= FF_MM_MMX;
|
rval |= FF_MM_MMX;
|
||||||
if (std_caps & (1<<25))
|
if (std_caps & (1<<25))
|
||||||
rval |= FF_MM_MMXEXT
|
rval |= FF_MM_MMXEXT
|
||||||
#ifdef HAVE_SSE
|
#if HAVE_SSE
|
||||||
| FF_MM_SSE;
|
| FF_MM_SSE;
|
||||||
if (std_caps & (1<<26))
|
if (std_caps & (1<<26))
|
||||||
rval |= FF_MM_SSE2;
|
rval |= FF_MM_SSE2;
|
||||||
|
@ -880,7 +880,7 @@ static void add_png_paeth_prediction_##cpu(uint8_t *dst, uint8_t *src, uint8_t *
|
|||||||
"pabsw %%mm5, %%mm5 \n"
|
"pabsw %%mm5, %%mm5 \n"
|
||||||
|
|
||||||
PAETH(mmx2, ABS3_MMX2)
|
PAETH(mmx2, ABS3_MMX2)
|
||||||
#ifdef HAVE_SSSE3
|
#if HAVE_SSSE3
|
||||||
PAETH(ssse3, ABS3_SSSE3)
|
PAETH(ssse3, ABS3_SSSE3)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -1765,7 +1765,7 @@ void ff_mmxext_idct(DCTELEM *block);
|
|||||||
|
|
||||||
/* XXX: those functions should be suppressed ASAP when all IDCTs are
|
/* XXX: those functions should be suppressed ASAP when all IDCTs are
|
||||||
converted */
|
converted */
|
||||||
#ifdef CONFIG_GPL
|
#if CONFIG_GPL
|
||||||
static void ff_libmpeg2mmx_idct_put(uint8_t *dest, int line_size, DCTELEM *block)
|
static void ff_libmpeg2mmx_idct_put(uint8_t *dest, int line_size, DCTELEM *block)
|
||||||
{
|
{
|
||||||
ff_mmx_idct (block);
|
ff_mmx_idct (block);
|
||||||
@ -2147,7 +2147,7 @@ static void vector_fmul_add_add_sse(float *dst, const float *src0, const float *
|
|||||||
|
|
||||||
static void vector_fmul_window_3dnow2(float *dst, const float *src0, const float *src1,
|
static void vector_fmul_window_3dnow2(float *dst, const float *src0, const float *src1,
|
||||||
const float *win, float add_bias, int len){
|
const float *win, float add_bias, int len){
|
||||||
#ifdef HAVE_6REGS
|
#if HAVE_6REGS
|
||||||
if(add_bias == 0){
|
if(add_bias == 0){
|
||||||
x86_reg i = -len*4;
|
x86_reg i = -len*4;
|
||||||
x86_reg j = len*4-8;
|
x86_reg j = len*4-8;
|
||||||
@ -2182,7 +2182,7 @@ static void vector_fmul_window_3dnow2(float *dst, const float *src0, const float
|
|||||||
|
|
||||||
static void vector_fmul_window_sse(float *dst, const float *src0, const float *src1,
|
static void vector_fmul_window_sse(float *dst, const float *src0, const float *src1,
|
||||||
const float *win, float add_bias, int len){
|
const float *win, float add_bias, int len){
|
||||||
#ifdef HAVE_6REGS
|
#if HAVE_6REGS
|
||||||
if(add_bias == 0){
|
if(add_bias == 0){
|
||||||
x86_reg i = -len*4;
|
x86_reg i = -len*4;
|
||||||
x86_reg j = len*4-16;
|
x86_reg j = len*4-16;
|
||||||
@ -2324,7 +2324,7 @@ static void float_to_int16_sse2(int16_t *dst, const float *src, long len){
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_YASM
|
#if HAVE_YASM
|
||||||
void ff_float_to_int16_interleave6_sse(int16_t *dst, const float **src, int len);
|
void ff_float_to_int16_interleave6_sse(int16_t *dst, const float **src, int len);
|
||||||
void ff_float_to_int16_interleave6_3dnow(int16_t *dst, const float **src, int len);
|
void ff_float_to_int16_interleave6_3dnow(int16_t *dst, const float **src, int len);
|
||||||
void ff_float_to_int16_interleave6_3dn2(int16_t *dst, const float **src, int len);
|
void ff_float_to_int16_interleave6_3dn2(int16_t *dst, const float **src, int len);
|
||||||
@ -2332,7 +2332,7 @@ void ff_x264_deblock_v_luma_sse2(uint8_t *pix, int stride, int alpha, int beta,
|
|||||||
void ff_x264_deblock_h_luma_sse2(uint8_t *pix, int stride, int alpha, int beta, int8_t *tc0);
|
void ff_x264_deblock_h_luma_sse2(uint8_t *pix, int stride, int alpha, int beta, int8_t *tc0);
|
||||||
void ff_x264_deblock_v8_luma_intra_mmxext(uint8_t *pix, int stride, int alpha, int beta);
|
void ff_x264_deblock_v8_luma_intra_mmxext(uint8_t *pix, int stride, int alpha, int beta);
|
||||||
void ff_x264_deblock_h_luma_intra_mmxext(uint8_t *pix, int stride, int alpha, int beta);
|
void ff_x264_deblock_h_luma_intra_mmxext(uint8_t *pix, int stride, int alpha, int beta);
|
||||||
#ifdef ARCH_X86_32
|
#if ARCH_X86_32
|
||||||
static void ff_x264_deblock_v_luma_intra_mmxext(uint8_t *pix, int stride, int alpha, int beta)
|
static void ff_x264_deblock_v_luma_intra_mmxext(uint8_t *pix, int stride, int alpha, int beta)
|
||||||
{
|
{
|
||||||
ff_x264_deblock_v8_luma_intra_mmxext(pix+0, stride, alpha, beta);
|
ff_x264_deblock_v8_luma_intra_mmxext(pix+0, stride, alpha, beta);
|
||||||
@ -2555,7 +2555,7 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx)
|
|||||||
c->idct_add= ff_simple_idct_add_mmx;
|
c->idct_add= ff_simple_idct_add_mmx;
|
||||||
c->idct = ff_simple_idct_mmx;
|
c->idct = ff_simple_idct_mmx;
|
||||||
c->idct_permutation_type= FF_SIMPLE_IDCT_PERM;
|
c->idct_permutation_type= FF_SIMPLE_IDCT_PERM;
|
||||||
#ifdef CONFIG_GPL
|
#if CONFIG_GPL
|
||||||
}else if(idct_algo==FF_IDCT_LIBMPEG2MMX){
|
}else if(idct_algo==FF_IDCT_LIBMPEG2MMX){
|
||||||
if(mm_flags & FF_MM_MMXEXT){
|
if(mm_flags & FF_MM_MMXEXT){
|
||||||
c->idct_put= ff_libmpeg2mmx2_idct_put;
|
c->idct_put= ff_libmpeg2mmx2_idct_put;
|
||||||
@ -2853,7 +2853,7 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx)
|
|||||||
H264_QPEL_FUNCS(3, 2, sse2);
|
H264_QPEL_FUNCS(3, 2, sse2);
|
||||||
H264_QPEL_FUNCS(3, 3, sse2);
|
H264_QPEL_FUNCS(3, 3, sse2);
|
||||||
}
|
}
|
||||||
#ifdef HAVE_SSSE3
|
#if HAVE_SSSE3
|
||||||
if(mm_flags & FF_MM_SSSE3){
|
if(mm_flags & FF_MM_SSSE3){
|
||||||
H264_QPEL_FUNCS(1, 0, ssse3);
|
H264_QPEL_FUNCS(1, 0, ssse3);
|
||||||
H264_QPEL_FUNCS(1, 1, ssse3);
|
H264_QPEL_FUNCS(1, 1, ssse3);
|
||||||
@ -2876,14 +2876,14 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(CONFIG_GPL) && defined(HAVE_YASM)
|
#if CONFIG_GPL && HAVE_YASM
|
||||||
if( mm_flags&FF_MM_MMXEXT ){
|
if( mm_flags&FF_MM_MMXEXT ){
|
||||||
#ifdef ARCH_X86_32
|
#if ARCH_X86_32
|
||||||
c->h264_v_loop_filter_luma_intra = ff_x264_deblock_v_luma_intra_mmxext;
|
c->h264_v_loop_filter_luma_intra = ff_x264_deblock_v_luma_intra_mmxext;
|
||||||
c->h264_h_loop_filter_luma_intra = ff_x264_deblock_h_luma_intra_mmxext;
|
c->h264_h_loop_filter_luma_intra = ff_x264_deblock_h_luma_intra_mmxext;
|
||||||
#endif
|
#endif
|
||||||
if( mm_flags&FF_MM_SSE2 ){
|
if( mm_flags&FF_MM_SSE2 ){
|
||||||
#if defined(ARCH_X86_64) || !defined(__ICC) || __ICC > 1100
|
#if ARCH_X86_64 || !defined(__ICC) || __ICC > 1100
|
||||||
c->h264_v_loop_filter_luma = ff_x264_deblock_v_luma_sse2;
|
c->h264_v_loop_filter_luma = ff_x264_deblock_v_luma_sse2;
|
||||||
c->h264_h_loop_filter_luma = ff_x264_deblock_h_luma_sse2;
|
c->h264_h_loop_filter_luma = ff_x264_deblock_h_luma_sse2;
|
||||||
c->h264_v_loop_filter_luma_intra = ff_x264_deblock_v_luma_intra_sse2;
|
c->h264_v_loop_filter_luma_intra = ff_x264_deblock_v_luma_intra_sse2;
|
||||||
@ -2896,10 +2896,10 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_SNOW_DECODER
|
#if CONFIG_SNOW_DECODER
|
||||||
if(mm_flags & FF_MM_SSE2 & 0){
|
if(mm_flags & FF_MM_SSE2 & 0){
|
||||||
c->horizontal_compose97i = ff_snow_horizontal_compose97i_sse2;
|
c->horizontal_compose97i = ff_snow_horizontal_compose97i_sse2;
|
||||||
#ifdef HAVE_7REGS
|
#if HAVE_7REGS
|
||||||
c->vertical_compose97i = ff_snow_vertical_compose97i_sse2;
|
c->vertical_compose97i = ff_snow_vertical_compose97i_sse2;
|
||||||
#endif
|
#endif
|
||||||
c->inner_add_yblock = ff_snow_inner_add_yblock_sse2;
|
c->inner_add_yblock = ff_snow_inner_add_yblock_sse2;
|
||||||
@ -2907,7 +2907,7 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx)
|
|||||||
else{
|
else{
|
||||||
if(mm_flags & FF_MM_MMXEXT){
|
if(mm_flags & FF_MM_MMXEXT){
|
||||||
c->horizontal_compose97i = ff_snow_horizontal_compose97i_mmx;
|
c->horizontal_compose97i = ff_snow_horizontal_compose97i_mmx;
|
||||||
#ifdef HAVE_7REGS
|
#if HAVE_7REGS
|
||||||
c->vertical_compose97i = ff_snow_vertical_compose97i_mmx;
|
c->vertical_compose97i = ff_snow_vertical_compose97i_mmx;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -104,7 +104,7 @@ extern const double ff_pd_2[2];
|
|||||||
SBUTTERFLY(t, b, c, wd, q) /* t= a2 b2 c2 d2 e2 f2 g2 h2 */\
|
SBUTTERFLY(t, b, c, wd, q) /* t= a2 b2 c2 d2 e2 f2 g2 h2 */\
|
||||||
/* c= a3 b3 c3 d3 e3 f3 g3 h3 */
|
/* c= a3 b3 c3 d3 e3 f3 g3 h3 */
|
||||||
|
|
||||||
#ifdef ARCH_X86_64
|
#if ARCH_X86_64
|
||||||
// permutes 01234567 -> 05736421
|
// permutes 01234567 -> 05736421
|
||||||
#define TRANSPOSE8(a,b,c,d,e,f,g,h,t)\
|
#define TRANSPOSE8(a,b,c,d,e,f,g,h,t)\
|
||||||
SBUTTERFLY(a,b,%%xmm8,wd,dqa)\
|
SBUTTERFLY(a,b,%%xmm8,wd,dqa)\
|
||||||
|
@ -1015,7 +1015,7 @@ static void sub_hfyu_median_prediction_mmx2(uint8_t *dst, uint8_t *src1, uint8_t
|
|||||||
MMABS_SUM(%%xmm7, %%xmm9, %%xmm1)\
|
MMABS_SUM(%%xmm7, %%xmm9, %%xmm1)\
|
||||||
"paddusw %%xmm1, %%xmm0 \n\t"
|
"paddusw %%xmm1, %%xmm0 \n\t"
|
||||||
|
|
||||||
#ifdef ARCH_X86_64
|
#if ARCH_X86_64
|
||||||
#define MMABS_SUM_8x8_SSE2 MMABS_SUM_8x8_NOSPILL
|
#define MMABS_SUM_8x8_SSE2 MMABS_SUM_8x8_NOSPILL
|
||||||
#else
|
#else
|
||||||
#define MMABS_SUM_8x8_SSE2\
|
#define MMABS_SUM_8x8_SSE2\
|
||||||
@ -1180,7 +1180,7 @@ HADAMARD8_DIFF_SSE2(sse2)
|
|||||||
#undef MMABS_SUM_8x8
|
#undef MMABS_SUM_8x8
|
||||||
#undef HSUM
|
#undef HSUM
|
||||||
|
|
||||||
#ifdef HAVE_SSSE3
|
#if HAVE_SSSE3
|
||||||
#define MMABS(a,z) MMABS_SSSE3(a,z)
|
#define MMABS(a,z) MMABS_SSSE3(a,z)
|
||||||
#define MMABS_SUM_8x8 MMABS_SUM_8x8_NOSPILL
|
#define MMABS_SUM_8x8 MMABS_SUM_8x8_NOSPILL
|
||||||
HADAMARD8_DIFF_SSE2(ssse3)
|
HADAMARD8_DIFF_SSE2(ssse3)
|
||||||
@ -1245,7 +1245,7 @@ DCT_SAD_FUNC(mmx2)
|
|||||||
DCT_SAD_FUNC(sse2)
|
DCT_SAD_FUNC(sse2)
|
||||||
#undef MMABS
|
#undef MMABS
|
||||||
|
|
||||||
#ifdef HAVE_SSSE3
|
#if HAVE_SSSE3
|
||||||
#define MMABS(a,z) MMABS_SSSE3(a,z)
|
#define MMABS(a,z) MMABS_SSSE3(a,z)
|
||||||
DCT_SAD_FUNC(ssse3)
|
DCT_SAD_FUNC(ssse3)
|
||||||
#undef MMABS
|
#undef MMABS
|
||||||
@ -1325,7 +1325,7 @@ static int ssd_int8_vs_int16_mmx(const int8_t *pix1, const int16_t *pix2, int si
|
|||||||
#undef SCALE_OFFSET
|
#undef SCALE_OFFSET
|
||||||
#undef PMULHRW
|
#undef PMULHRW
|
||||||
|
|
||||||
#ifdef HAVE_SSSE3
|
#if HAVE_SSSE3
|
||||||
#undef PHADDD
|
#undef PHADDD
|
||||||
#define DEF(x) x ## _ssse3
|
#define DEF(x) x ## _ssse3
|
||||||
#define SET_RND(x)
|
#define SET_RND(x)
|
||||||
@ -1417,7 +1417,7 @@ void dsputilenc_init_mmx(DSPContext* c, AVCodecContext *avctx)
|
|||||||
c->flac_compute_autocorr = ff_flac_compute_autocorr_sse2;
|
c->flac_compute_autocorr = ff_flac_compute_autocorr_sse2;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_SSSE3
|
#if HAVE_SSSE3
|
||||||
if(mm_flags & FF_MM_SSSE3){
|
if(mm_flags & FF_MM_SSSE3){
|
||||||
if(!(avctx->flags & CODEC_FLAG_BITEXACT)){
|
if(!(avctx->flags & CODEC_FLAG_BITEXACT)){
|
||||||
c->try_8x8basis= try_8x8basis_ssse3;
|
c->try_8x8basis= try_8x8basis_ssse3;
|
||||||
|
@ -108,7 +108,7 @@ void ff_imdct_half_sse(MDCTContext *s, FFTSample *output, const FFTSample *input
|
|||||||
::"r"(-4*k), "r"(4*k),
|
::"r"(-4*k), "r"(4*k),
|
||||||
"r"(input+n4), "r"(tcos+n8), "r"(tsin+n8)
|
"r"(input+n4), "r"(tcos+n8), "r"(tsin+n8)
|
||||||
);
|
);
|
||||||
#ifdef ARCH_X86_64
|
#if ARCH_X86_64
|
||||||
// if we have enough regs, don't let gcc make the luts latency-bound
|
// if we have enough regs, don't let gcc make the luts latency-bound
|
||||||
// but if not, latency is faster than spilling
|
// but if not, latency is faster than spilling
|
||||||
__asm__("movlps %%xmm0, %0 \n"
|
__asm__("movlps %%xmm0, %0 \n"
|
||||||
|
@ -33,9 +33,7 @@
|
|||||||
|
|
||||||
//FIXME use some macros to avoid duplicating get_cabac (cannot be done yet
|
//FIXME use some macros to avoid duplicating get_cabac (cannot be done yet
|
||||||
//as that would make optimization work hard)
|
//as that would make optimization work hard)
|
||||||
#if defined(ARCH_X86) && defined(HAVE_7REGS) && \
|
#if ARCH_X86 && HAVE_7REGS && HAVE_EBX_AVAILABLE && !defined(BROKEN_RELOCATIONS)
|
||||||
defined(HAVE_EBX_AVAILABLE) && \
|
|
||||||
!defined(BROKEN_RELOCATIONS)
|
|
||||||
static int decode_significance_x86(CABACContext *c, int max_coeff,
|
static int decode_significance_x86(CABACContext *c, int max_coeff,
|
||||||
uint8_t *significant_coeff_ctx_base,
|
uint8_t *significant_coeff_ctx_base,
|
||||||
int *index){
|
int *index){
|
||||||
@ -149,7 +147,7 @@ static int decode_significance_8x8_x86(CABACContext *c,
|
|||||||
);
|
);
|
||||||
return coeff_count;
|
return coeff_count;
|
||||||
}
|
}
|
||||||
#endif /* defined(ARCH_X86) && defined(HAVE_7REGS) && */
|
#endif /* ARCH_X86 && HAVE_7REGS && HAVE_EBX_AVAILABLE */
|
||||||
/* defined(HAVE_EBX_AVAILABLE) && !defined(BROKEN_RELOCATIONS) */
|
/* !defined(BROKEN_RELOCATIONS) */
|
||||||
|
|
||||||
#endif /* AVCODEC_X86_H264_I386_H */
|
#endif /* AVCODEC_X86_H264_I386_H */
|
||||||
|
@ -472,7 +472,7 @@ static void ff_h264_idct_add8_mmx2(uint8_t **dest, const int *block_offset, DCTE
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(CONFIG_GPL) && defined(HAVE_YASM)
|
#if CONFIG_GPL && HAVE_YASM
|
||||||
static void ff_h264_idct_dc_add8_mmx2(uint8_t *dst, int16_t *block, int stride)
|
static void ff_h264_idct_dc_add8_mmx2(uint8_t *dst, int16_t *block, int stride)
|
||||||
{
|
{
|
||||||
__asm__ volatile(
|
__asm__ volatile(
|
||||||
@ -1488,7 +1488,7 @@ static void OPNAME ## pixels16_l2_shift5_ ## MMX(uint8_t *dst, int16_t *src16, u
|
|||||||
}\
|
}\
|
||||||
|
|
||||||
|
|
||||||
#ifdef ARCH_X86_64
|
#if ARCH_X86_64
|
||||||
#define QPEL_H264_H16_XMM(OPNAME, OP, MMX)\
|
#define QPEL_H264_H16_XMM(OPNAME, OP, MMX)\
|
||||||
static av_noinline void OPNAME ## h264_qpel16_h_lowpass_l2_ ## MMX(uint8_t *dst, uint8_t *src, uint8_t *src2, int dstStride, int src2Stride){\
|
static av_noinline void OPNAME ## h264_qpel16_h_lowpass_l2_ ## MMX(uint8_t *dst, uint8_t *src, uint8_t *src2, int dstStride, int src2Stride){\
|
||||||
int h=16;\
|
int h=16;\
|
||||||
@ -2065,7 +2065,7 @@ QPEL_H264_V_XMM(put_, PUT_OP, sse2)
|
|||||||
QPEL_H264_V_XMM(avg_, AVG_MMX2_OP, sse2)
|
QPEL_H264_V_XMM(avg_, AVG_MMX2_OP, sse2)
|
||||||
QPEL_H264_HV_XMM(put_, PUT_OP, sse2)
|
QPEL_H264_HV_XMM(put_, PUT_OP, sse2)
|
||||||
QPEL_H264_HV_XMM(avg_, AVG_MMX2_OP, sse2)
|
QPEL_H264_HV_XMM(avg_, AVG_MMX2_OP, sse2)
|
||||||
#ifdef HAVE_SSSE3
|
#if HAVE_SSSE3
|
||||||
QPEL_H264_H_XMM(put_, PUT_OP, ssse3)
|
QPEL_H264_H_XMM(put_, PUT_OP, ssse3)
|
||||||
QPEL_H264_H_XMM(avg_, AVG_MMX2_OP, ssse3)
|
QPEL_H264_H_XMM(avg_, AVG_MMX2_OP, ssse3)
|
||||||
QPEL_H264_HV2_XMM(put_, PUT_OP, ssse3)
|
QPEL_H264_HV2_XMM(put_, PUT_OP, ssse3)
|
||||||
@ -2079,7 +2079,7 @@ H264_MC_4816(3dnow)
|
|||||||
H264_MC_4816(mmx2)
|
H264_MC_4816(mmx2)
|
||||||
H264_MC_816(H264_MC_V, sse2)
|
H264_MC_816(H264_MC_V, sse2)
|
||||||
H264_MC_816(H264_MC_HV, sse2)
|
H264_MC_816(H264_MC_HV, sse2)
|
||||||
#ifdef HAVE_SSSE3
|
#if HAVE_SSSE3
|
||||||
H264_MC_816(H264_MC_H, ssse3)
|
H264_MC_816(H264_MC_H, ssse3)
|
||||||
H264_MC_816(H264_MC_HV, ssse3)
|
H264_MC_816(H264_MC_HV, ssse3)
|
||||||
#endif
|
#endif
|
||||||
@ -2161,7 +2161,7 @@ static void avg_h264_chroma_mc4_3dnow(uint8_t *dst/*align 8*/, uint8_t *src/*ali
|
|||||||
#undef H264_CHROMA_MC4_TMPL
|
#undef H264_CHROMA_MC4_TMPL
|
||||||
#undef H264_CHROMA_MC8_MV0
|
#undef H264_CHROMA_MC8_MV0
|
||||||
|
|
||||||
#ifdef HAVE_SSSE3
|
#if HAVE_SSSE3
|
||||||
#define AVG_OP(X)
|
#define AVG_OP(X)
|
||||||
#undef H264_CHROMA_MC8_TMPL
|
#undef H264_CHROMA_MC8_TMPL
|
||||||
#undef H264_CHROMA_MC4_TMPL
|
#undef H264_CHROMA_MC4_TMPL
|
||||||
|
@ -103,7 +103,7 @@ DECLARE_ASM_CONST(16, int32_t, walkenIdctRounders[]) = {
|
|||||||
#define CLEAR_ODD(r) "pxor "r","r" \n\t"
|
#define CLEAR_ODD(r) "pxor "r","r" \n\t"
|
||||||
#define PUT_ODD(dst) "pshufhw $0x1B, %%xmm2, "dst" \n\t"
|
#define PUT_ODD(dst) "pshufhw $0x1B, %%xmm2, "dst" \n\t"
|
||||||
|
|
||||||
#ifdef ARCH_X86_64
|
#if ARCH_X86_64
|
||||||
|
|
||||||
# define ROW0 "%%xmm8"
|
# define ROW0 "%%xmm8"
|
||||||
# define REG0 ROW0
|
# define REG0 ROW0
|
||||||
@ -371,7 +371,7 @@ inline void ff_idct_xvid_sse2(short *block)
|
|||||||
JZ("%%esi", "1f")
|
JZ("%%esi", "1f")
|
||||||
"5: \n\t"
|
"5: \n\t"
|
||||||
iMTX_MULT("7*16(%0)", MANGLE(iTab2), ROUND(walkenIdctRounders+5*16), PUT_ODD(ROW7))
|
iMTX_MULT("7*16(%0)", MANGLE(iTab2), ROUND(walkenIdctRounders+5*16), PUT_ODD(ROW7))
|
||||||
#ifndef ARCH_X86_64
|
#if !ARCH_X86_64
|
||||||
iLLM_HEAD
|
iLLM_HEAD
|
||||||
#endif
|
#endif
|
||||||
iLLM_PASS("%0")
|
iLLM_PASS("%0")
|
||||||
|
@ -583,25 +583,30 @@ static void denoise_dct_sse2(MpegEncContext *s, DCTELEM *block){
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_SSSE3
|
#if HAVE_SSSE3
|
||||||
#define HAVE_SSSE3_BAK
|
#define HAVE_SSSE3_BAK
|
||||||
#endif
|
#endif
|
||||||
#undef HAVE_SSSE3
|
#undef HAVE_SSSE3
|
||||||
|
#define HAVE_SSSE3 0
|
||||||
|
|
||||||
#undef HAVE_SSE2
|
#undef HAVE_SSE2
|
||||||
#undef HAVE_MMX2
|
#undef HAVE_MMX2
|
||||||
|
#define HAVE_SSE2 0
|
||||||
|
#define HAVE_MMX2 0
|
||||||
#define RENAME(a) a ## _MMX
|
#define RENAME(a) a ## _MMX
|
||||||
#define RENAMEl(a) a ## _mmx
|
#define RENAMEl(a) a ## _mmx
|
||||||
#include "mpegvideo_mmx_template.c"
|
#include "mpegvideo_mmx_template.c"
|
||||||
|
|
||||||
#define HAVE_MMX2
|
#undef HAVE_MMX2
|
||||||
|
#define HAVE_MMX2 1
|
||||||
#undef RENAME
|
#undef RENAME
|
||||||
#undef RENAMEl
|
#undef RENAMEl
|
||||||
#define RENAME(a) a ## _MMX2
|
#define RENAME(a) a ## _MMX2
|
||||||
#define RENAMEl(a) a ## _mmx2
|
#define RENAMEl(a) a ## _mmx2
|
||||||
#include "mpegvideo_mmx_template.c"
|
#include "mpegvideo_mmx_template.c"
|
||||||
|
|
||||||
#define HAVE_SSE2
|
#undef HAVE_SSE2
|
||||||
|
#define HAVE_SSE2 1
|
||||||
#undef RENAME
|
#undef RENAME
|
||||||
#undef RENAMEl
|
#undef RENAMEl
|
||||||
#define RENAME(a) a ## _SSE2
|
#define RENAME(a) a ## _SSE2
|
||||||
@ -609,7 +614,8 @@ static void denoise_dct_sse2(MpegEncContext *s, DCTELEM *block){
|
|||||||
#include "mpegvideo_mmx_template.c"
|
#include "mpegvideo_mmx_template.c"
|
||||||
|
|
||||||
#ifdef HAVE_SSSE3_BAK
|
#ifdef HAVE_SSSE3_BAK
|
||||||
#define HAVE_SSSE3
|
#undef HAVE_SSSE3
|
||||||
|
#define HAVE_SSSE3 1
|
||||||
#undef RENAME
|
#undef RENAME
|
||||||
#undef RENAMEl
|
#undef RENAMEl
|
||||||
#define RENAME(a) a ## _SSSE3
|
#define RENAME(a) a ## _SSSE3
|
||||||
@ -637,7 +643,7 @@ void MPV_common_init_mmx(MpegEncContext *s)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(dct_algo==FF_DCT_AUTO || dct_algo==FF_DCT_MMX){
|
if(dct_algo==FF_DCT_AUTO || dct_algo==FF_DCT_MMX){
|
||||||
#ifdef HAVE_SSSE3
|
#if HAVE_SSSE3
|
||||||
if(mm_flags & FF_MM_SSSE3){
|
if(mm_flags & FF_MM_SSSE3){
|
||||||
s->dct_quantize= dct_quantize_SSSE3;
|
s->dct_quantize= dct_quantize_SSSE3;
|
||||||
} else
|
} else
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
#undef SAVE_SIGN
|
#undef SAVE_SIGN
|
||||||
#undef RESTORE_SIGN
|
#undef RESTORE_SIGN
|
||||||
|
|
||||||
#if defined(HAVE_SSE2)
|
#if HAVE_SSE2
|
||||||
#define MMREG_WIDTH "16"
|
#define MMREG_WIDTH "16"
|
||||||
#define MM "%%xmm"
|
#define MM "%%xmm"
|
||||||
#define MOVQ "movdqa"
|
#define MOVQ "movdqa"
|
||||||
@ -48,7 +48,7 @@
|
|||||||
#define MMREG_WIDTH "8"
|
#define MMREG_WIDTH "8"
|
||||||
#define MM "%%mm"
|
#define MM "%%mm"
|
||||||
#define MOVQ "movq"
|
#define MOVQ "movq"
|
||||||
#if defined(HAVE_MMX2)
|
#if HAVE_MMX2
|
||||||
#define SPREADW(a) "pshufw $0, "a", "a" \n\t"
|
#define SPREADW(a) "pshufw $0, "a", "a" \n\t"
|
||||||
#define PMAXW(a,b) "pmaxsw "a", "b" \n\t"
|
#define PMAXW(a,b) "pmaxsw "a", "b" \n\t"
|
||||||
#define PMAX(a,b) \
|
#define PMAX(a,b) \
|
||||||
@ -74,7 +74,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_SSSE3
|
#if HAVE_SSSE3
|
||||||
#define SAVE_SIGN(a,b) \
|
#define SAVE_SIGN(a,b) \
|
||||||
"movdqa "b", "a" \n\t"\
|
"movdqa "b", "a" \n\t"\
|
||||||
"pabsw "b", "b" \n\t"
|
"pabsw "b", "b" \n\t"
|
||||||
@ -219,7 +219,7 @@ static int RENAME(dct_quantize)(MpegEncContext *s,
|
|||||||
SPREADW(MM"1")
|
SPREADW(MM"1")
|
||||||
"psubusw "MM"1, "MM"4 \n\t"
|
"psubusw "MM"1, "MM"4 \n\t"
|
||||||
"packuswb "MM"4, "MM"4 \n\t"
|
"packuswb "MM"4, "MM"4 \n\t"
|
||||||
#ifdef HAVE_SSE2
|
#if HAVE_SSE2
|
||||||
"packuswb "MM"4, "MM"4 \n\t"
|
"packuswb "MM"4, "MM"4 \n\t"
|
||||||
#endif
|
#endif
|
||||||
"movd "MM"4, %0 \n\t" // *overflow
|
"movd "MM"4, %0 \n\t" // *overflow
|
||||||
|
@ -386,7 +386,7 @@ void ff_snow_horizontal_compose97i_mmx(IDWTELEM *b, int width){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_7REGS
|
#if HAVE_7REGS
|
||||||
#define snow_vertical_compose_sse2_load_add(op,r,t0,t1,t2,t3)\
|
#define snow_vertical_compose_sse2_load_add(op,r,t0,t1,t2,t3)\
|
||||||
""op" ("r",%%"REG_d"), %%"t0" \n\t"\
|
""op" ("r",%%"REG_d"), %%"t0" \n\t"\
|
||||||
""op" 16("r",%%"REG_d"), %%"t1" \n\t"\
|
""op" 16("r",%%"REG_d"), %%"t1" \n\t"\
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#ifdef HAVE_SOUNDCARD_H
|
#if HAVE_SOUNDCARD_H
|
||||||
#include <soundcard.h>
|
#include <soundcard.h>
|
||||||
#else
|
#else
|
||||||
#include <sys/soundcard.h>
|
#include <sys/soundcard.h>
|
||||||
@ -311,7 +311,7 @@ static int audio_read_close(AVFormatContext *s1)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_OSS_DEMUXER
|
#if CONFIG_OSS_DEMUXER
|
||||||
AVInputFormat oss_demuxer = {
|
AVInputFormat oss_demuxer = {
|
||||||
"oss",
|
"oss",
|
||||||
NULL_IF_CONFIG_SMALL("Open Sound System capture"),
|
NULL_IF_CONFIG_SMALL("Open Sound System capture"),
|
||||||
@ -324,7 +324,7 @@ AVInputFormat oss_demuxer = {
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_OSS_MUXER
|
#if CONFIG_OSS_MUXER
|
||||||
AVOutputFormat oss_muxer = {
|
AVOutputFormat oss_muxer = {
|
||||||
"oss",
|
"oss",
|
||||||
NULL_IF_CONFIG_SMALL("Open Sound System playback"),
|
NULL_IF_CONFIG_SMALL("Open Sound System playback"),
|
||||||
|
@ -33,7 +33,7 @@ extern "C" {
|
|||||||
#include "libavformat/avformat.h"
|
#include "libavformat/avformat.h"
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_BSOUNDRECORDER
|
#if HAVE_BSOUNDRECORDER
|
||||||
#include <SoundRecorder.h>
|
#include <SoundRecorder.h>
|
||||||
using namespace BPrivate::Media::Experimental;
|
using namespace BPrivate::Media::Experimental;
|
||||||
#endif
|
#endif
|
||||||
@ -63,7 +63,7 @@ typedef struct {
|
|||||||
sem_id output_sem;
|
sem_id output_sem;
|
||||||
int output_index;
|
int output_index;
|
||||||
BSoundPlayer *player;
|
BSoundPlayer *player;
|
||||||
#ifdef HAVE_BSOUNDRECORDER
|
#if HAVE_BSOUNDRECORDER
|
||||||
BSoundRecorder *recorder;
|
BSoundRecorder *recorder;
|
||||||
#endif
|
#endif
|
||||||
int has_quit; /* signal callbacks not to wait */
|
int has_quit; /* signal callbacks not to wait */
|
||||||
@ -150,7 +150,7 @@ static void audioplay_callback(void *cookie, void *buffer, size_t bufferSize, co
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_BSOUNDRECORDER
|
#if HAVE_BSOUNDRECORDER
|
||||||
/* called back by BSoundRecorder */
|
/* called back by BSoundRecorder */
|
||||||
static void audiorecord_callback(void *cookie, bigtime_t timestamp, void *buffer, size_t bufferSize, const media_multi_audio_format &format)
|
static void audiorecord_callback(void *cookie, bigtime_t timestamp, void *buffer, size_t bufferSize, const media_multi_audio_format &format)
|
||||||
{
|
{
|
||||||
@ -192,7 +192,7 @@ static int audio_open(AudioData *s, int is_output, const char *audio_device)
|
|||||||
media_raw_audio_format format;
|
media_raw_audio_format format;
|
||||||
media_multi_audio_format iformat;
|
media_multi_audio_format iformat;
|
||||||
|
|
||||||
#ifndef HAVE_BSOUNDRECORDER
|
#if !HAVE_BSOUNDRECORDER
|
||||||
if (!is_output)
|
if (!is_output)
|
||||||
return AVERROR(EIO); /* not for now */
|
return AVERROR(EIO); /* not for now */
|
||||||
#endif
|
#endif
|
||||||
@ -210,7 +210,7 @@ static int audio_open(AudioData *s, int is_output, const char *audio_device)
|
|||||||
s->frame_size = AUDIO_BLOCK_SIZE;
|
s->frame_size = AUDIO_BLOCK_SIZE;
|
||||||
/* bump up the priority (avoid realtime though) */
|
/* bump up the priority (avoid realtime though) */
|
||||||
set_thread_priority(find_thread(NULL), B_DISPLAY_PRIORITY+1);
|
set_thread_priority(find_thread(NULL), B_DISPLAY_PRIORITY+1);
|
||||||
#ifdef HAVE_BSOUNDRECORDER
|
#if HAVE_BSOUNDRECORDER
|
||||||
if (!is_output) {
|
if (!is_output) {
|
||||||
bool wait_for_input = false;
|
bool wait_for_input = false;
|
||||||
if (audio_device && !strcmp(audio_device, "wait:"))
|
if (audio_device && !strcmp(audio_device, "wait:"))
|
||||||
@ -273,7 +273,7 @@ static int audio_close(AudioData *s)
|
|||||||
}
|
}
|
||||||
if (s->player)
|
if (s->player)
|
||||||
delete s->player;
|
delete s->player;
|
||||||
#ifdef HAVE_BSOUNDRECORDER
|
#if HAVE_BSOUNDRECORDER
|
||||||
if (s->recorder)
|
if (s->recorder)
|
||||||
delete s->recorder;
|
delete s->recorder;
|
||||||
#endif
|
#endif
|
||||||
|
@ -26,13 +26,13 @@
|
|||||||
|
|
||||||
#define _BSD_SOURCE 1
|
#define _BSD_SOURCE 1
|
||||||
#include "libavformat/avformat.h"
|
#include "libavformat/avformat.h"
|
||||||
#if defined (HAVE_DEV_BKTR_IOCTL_METEOR_H) && defined (HAVE_DEV_BKTR_IOCTL_BT848_H)
|
#if HAVE_DEV_BKTR_IOCTL_METEOR_H && HAVE_DEV_BKTR_IOCTL_BT848_H
|
||||||
# include <dev/bktr/ioctl_meteor.h>
|
# include <dev/bktr/ioctl_meteor.h>
|
||||||
# include <dev/bktr/ioctl_bt848.h>
|
# include <dev/bktr/ioctl_bt848.h>
|
||||||
#elif defined (HAVE_MACHINE_IOCTL_METEOR_H) && defined (HAVE_MACHINE_IOCTL_BT848_H)
|
#elif HAVE_MACHINE_IOCTL_METEOR_H && HAVE_MACHINE_IOCTL_BT848_H
|
||||||
# include <machine/ioctl_meteor.h>
|
# include <machine/ioctl_meteor.h>
|
||||||
# include <machine/ioctl_bt848.h>
|
# include <machine/ioctl_bt848.h>
|
||||||
#elif defined (HAVE_DEV_VIDEO_METEOR_IOCTL_METEOR_H) && defined (HAVE_DEV_VIDEO_METEOR_IOCTL_BT848_H)
|
#elif HAVE_DEV_VIDEO_METEOR_IOCTL_METEOR_H && HAVE_DEV_VIDEO_METEOR_IOCTL_BT848_H
|
||||||
# include <dev/video/meteor/ioctl_meteor.h>
|
# include <dev/video/meteor/ioctl_meteor.h>
|
||||||
# include <dev/video/bktr/ioctl_bt848.h>
|
# include <dev/video/bktr/ioctl_bt848.h>
|
||||||
#elif HAVE_DEV_IC_BT8XX_H
|
#elif HAVE_DEV_IC_BT8XX_H
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#ifdef HAVE_SYS_VIDEOIO_H
|
#if HAVE_SYS_VIDEOIO_H
|
||||||
#include <sys/videoio.h>
|
#include <sys/videoio.h>
|
||||||
#else
|
#else
|
||||||
#include <asm/types.h>
|
#include <asm/types.h>
|
||||||
|
@ -170,7 +170,7 @@ static unsigned int get_aiff_header(ByteIOContext *pb, AVCodecContext *codec,
|
|||||||
return num_frames;
|
return num_frames;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_AIFF_MUXER
|
#if CONFIG_AIFF_MUXER
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int64_t form;
|
int64_t form;
|
||||||
int64_t frames;
|
int64_t frames;
|
||||||
@ -439,7 +439,7 @@ static int aiff_read_packet(AVFormatContext *s,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_AIFF_DEMUXER
|
#if CONFIG_AIFF_DEMUXER
|
||||||
AVInputFormat aiff_demuxer = {
|
AVInputFormat aiff_demuxer = {
|
||||||
"aiff",
|
"aiff",
|
||||||
NULL_IF_CONFIG_SMALL("Audio IFF"),
|
NULL_IF_CONFIG_SMALL("Audio IFF"),
|
||||||
@ -453,7 +453,7 @@ AVInputFormat aiff_demuxer = {
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_AIFF_MUXER
|
#if CONFIG_AIFF_MUXER
|
||||||
AVOutputFormat aiff_muxer = {
|
AVOutputFormat aiff_muxer = {
|
||||||
"aiff",
|
"aiff",
|
||||||
NULL_IF_CONFIG_SMALL("Audio IFF"),
|
NULL_IF_CONFIG_SMALL("Audio IFF"),
|
||||||
|
@ -168,7 +168,7 @@ void av_register_all(void)
|
|||||||
REGISTER_MUXER (RTP, rtp);
|
REGISTER_MUXER (RTP, rtp);
|
||||||
REGISTER_DEMUXER (RTSP, rtsp);
|
REGISTER_DEMUXER (RTSP, rtsp);
|
||||||
REGISTER_DEMUXER (SDP, sdp);
|
REGISTER_DEMUXER (SDP, sdp);
|
||||||
#ifdef CONFIG_SDP_DEMUXER
|
#if CONFIG_SDP_DEMUXER
|
||||||
av_register_rtp_dynamic_payload_handlers();
|
av_register_rtp_dynamic_payload_handlers();
|
||||||
av_register_rdt_dynamic_payload_handlers();
|
av_register_rdt_dynamic_payload_handlers();
|
||||||
#endif
|
#endif
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user