From 8d8646d573a0d042fd27ba3899a02d5af648ebae Mon Sep 17 00:00:00 2001 From: diego Date: Sat, 21 Feb 2009 17:35:48 +0000 Subject: [PATCH 01/22] Print the version string after the command line has been parsed. This allows printing the CPU information when verbose mode is triggered on the command line. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28691 b3059339-0415-0410-9bf9-f77b7e298cf2 --- mplayer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mplayer.c b/mplayer.c index 0c097db71b..1b6a35025b 100644 --- a/mplayer.c +++ b/mplayer.c @@ -2527,7 +2527,6 @@ int gui_no_filename=0; // Preparse the command line m_config_preparse_command_line(mconfig,argc,argv); - print_version("MPlayer"); #if (defined(__MINGW32__) || defined(__CYGWIN__)) && defined(CONFIG_WIN32DLL) set_path_env(); #endif @@ -2574,6 +2573,8 @@ int gui_no_filename=0; } } + print_version("MPlayer"); + #if (defined(__MINGW32__) || defined(__CYGWIN__)) && defined(CONFIG_GUI) void *runningmplayer = FindWindow("MPlayer GUI for Windows", "MPlayer for Windows"); if(runningmplayer && filename && use_gui){ From 1c6964f547648623893b852eb575c7d1d10abbe2 Mon Sep 17 00:00:00 2001 From: diego Date: Sat, 21 Feb 2009 17:36:26 +0000 Subject: [PATCH 02/22] Add HAVE_GETHRTIME and HAVE_INLINE_ASM definitions for FFmpeg. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28692 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configure b/configure index ea38883196..20361d61aa 100755 --- a/configure +++ b/configure @@ -8708,6 +8708,8 @@ $def_yasm #define CONFIG_SMALL 0 #define CONFIG_SWSCALE 1 +#define HAVE_GETHRTIME 0 +#define HAVE_INLINE_ASM 0 #define HAVE_POLL_H 1 #define HAVE_PPC4XX 0 From adbe22d1b40b43c9dacf7660845fb6695a204149 Mon Sep 17 00:00:00 2001 From: reimar Date: Sat, 21 Feb 2009 18:15:55 +0000 Subject: [PATCH 03/22] Add forgotten type to variable declaration. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28693 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_vdpau.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libvo/vo_vdpau.c b/libvo/vo_vdpau.c index 7d6496afb4..a2ffcb6a01 100644 --- a/libvo/vo_vdpau.c +++ b/libvo/vo_vdpau.c @@ -330,9 +330,9 @@ static int create_vdp_mixer(VdpChromaType vdp_chroma_type) { int feature_count = 0; VdpVideoMixerFeature features[MAX_NUM_FEATURES]; VdpBool feature_enables[MAX_NUM_FEATURES]; - static const denoise_attrib[] = {VDP_VIDEO_MIXER_ATTRIBUTE_NOISE_REDUCTION_LEVEL}; + static const VdpVideoMixerAttribute denoise_attrib[] = {VDP_VIDEO_MIXER_ATTRIBUTE_NOISE_REDUCTION_LEVEL}; const void * const denoise_value[] = {&denoise}; - static const sharpen_attrib[] = {VDP_VIDEO_MIXER_ATTRIBUTE_SHARPNESS_LEVEL}; + static const VdpVideoMixerAttribute sharpen_attrib[] = {VDP_VIDEO_MIXER_ATTRIBUTE_SHARPNESS_LEVEL}; const void * const sharpen_value[] = {&sharpen}; static const VdpVideoMixerParameter parameters[VDP_NUM_MIXER_PARAMETER] = { VDP_VIDEO_MIXER_PARAMETER_VIDEO_SURFACE_WIDTH, From 2c48477e534169a21b78c8d03e4e07fef1aa69cd Mon Sep 17 00:00:00 2001 From: diego Date: Sat, 21 Feb 2009 20:25:02 +0000 Subject: [PATCH 04/22] Add -ffast-math to LDFLAGS as well as to CFLAGS. patch by Piotr Kaczuba, pepe attika.ath cx git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28694 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 1 + 1 file changed, 1 insertion(+) diff --git a/configure b/configure index 20361d61aa..2766f547af 100755 --- a/configure +++ b/configure @@ -2398,6 +2398,7 @@ elif test -z "$CFLAGS" ; then CFLAGS="-O2 $_march $_mcpu $_pipe" else CFLAGS="-Wall -Wno-switch -Wpointer-arith -Wredundant-decls -O4 $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer" + _ld_extra="$_ld_extra -ffast-math" fi else _warn_CFLAGS=yes From 35fc0ebf3fe200b54af142e99facfe8dc2942544 Mon Sep 17 00:00:00 2001 From: diego Date: Sat, 21 Feb 2009 21:03:57 +0000 Subject: [PATCH 05/22] Set time_base to 1/samplerate, like FFmpeg does, instead of leaving it at the default 0/1. This is not required by a lot of codecs, but at least by libvorbis. patch by Nicolas George, nicolas.george normalesup org git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28695 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpcodecs/ae_lavc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libmpcodecs/ae_lavc.c b/libmpcodecs/ae_lavc.c index b31eb62fce..3b07d6a963 100644 --- a/libmpcodecs/ae_lavc.c +++ b/libmpcodecs/ae_lavc.c @@ -206,6 +206,8 @@ int mpae_init_lavc(audio_encoder_t *encoder) // put sample parameters lavc_actx->channels = encoder->params.channels; lavc_actx->sample_rate = encoder->params.sample_rate; + lavc_actx->time_base.num = 1; + lavc_actx->time_base.den = encoder->params.sample_rate; if(lavc_param_abitrate<1000) lavc_actx->bit_rate = encoder->params.bitrate = lavc_param_abitrate * 1000; else From 0cddea37546e00caa3f438e0da6e21b931b8de48 Mon Sep 17 00:00:00 2001 From: diego Date: Sat, 21 Feb 2009 21:27:27 +0000 Subject: [PATCH 06/22] Add statistics audio filter that prints information about the audio stream. patch by Nicolas George, nicolas.george normalesup org git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28696 b3059339-0415-0410-9bf9-f77b7e298cf2 --- Changelog | 1 + DOCS/man/en/mplayer.1 | 7 ++ Makefile | 1 + libaf/af.c | 2 + libaf/af_stats.c | 158 ++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 169 insertions(+) create mode 100644 libaf/af_stats.c diff --git a/Changelog b/Changelog index 263026c41c..e299463574 100644 --- a/Changelog +++ b/Changelog @@ -62,6 +62,7 @@ MPlayer (1.0) * change vf_screenshot dependency from libpng to lavc * add af_scaletempo which maintains audio pitch when changing playback speed * fix multi-channel reordering + * af_stats, filter to print information about the audio stream Streaming: * tv:// support for Windows diff --git a/DOCS/man/en/mplayer.1 b/DOCS/man/en/mplayer.1 index b5dbff3df8..c8d199fa6f 100644 --- a/DOCS/man/en/mplayer.1 +++ b/DOCS/man/en/mplayer.1 @@ -5486,6 +5486,13 @@ Changing playback speed, would change pitch, leaving audio tempo at 1.2x. .RE .PD 1 . +.TP +.B "stats\ \ " +Collects and prints statistics about the audio stream, especially the volume. +These statistics are especially intended to help adjusting the volume while +avoiding clipping. +The volumes are printed in dB and compatible with the volume audio filter. +. . . .SH "VIDEO FILTERS" diff --git a/Makefile b/Makefile index d4afdd524e..449b0589e3 100644 --- a/Makefile +++ b/Makefile @@ -68,6 +68,7 @@ SRCS_COMMON = asxparser.c \ libaf/af_resample.c \ libaf/af_scaletempo.c \ libaf/af_sinesuppress.c \ + libaf/af_stats.c \ libaf/af_sub.c \ libaf/af_surround.c \ libaf/af_sweep.c \ diff --git a/libaf/af.c b/libaf/af.c index 7333896882..77f30a4d45 100644 --- a/libaf/af.c +++ b/libaf/af.c @@ -51,6 +51,7 @@ extern af_info_t af_info_center; extern af_info_t af_info_sinesuppress; extern af_info_t af_info_karaoke; extern af_info_t af_info_scaletempo; +extern af_info_t af_info_stats; static af_info_t* filter_list[]={ &af_info_dummy, @@ -85,6 +86,7 @@ static af_info_t* filter_list[]={ &af_info_sinesuppress, &af_info_karaoke, &af_info_scaletempo, + &af_info_stats, NULL }; diff --git a/libaf/af_stats.c b/libaf/af_stats.c new file mode 100644 index 0000000000..dc24802e16 --- /dev/null +++ b/libaf/af_stats.c @@ -0,0 +1,158 @@ +/* + * Copyright (C) 2009 Nicolas George + * + * This file is part of MPlayer. + * + * MPlayer is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * MPlayer is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with MPlayer; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#include +#include +#include +#include + +#include "af.h" + +#define MAX_DB 80 +#define MIN_VAL 1E-8 + +struct af_stats +{ + long long n_samples; + double tsquare; + int max; + long long histogram[65536]; +}; + +static inline int logdb(double v) +{ + return v > 1 ? 0 : v <= MIN_VAL ? MAX_DB - 1 : + log(v) / -0.23025850929940456840179914546843642076; +} + +static int stats_init(af_instance_t *af, struct af_stats *s, af_data_t *data) +{ + int i; + + if (!data) + return AF_ERROR; + *(af->data) = *data; + af->data->format = AF_FORMAT_S16_NE; + af->data->bps = 2; + s->n_samples = 0; + s->tsquare = 0; + s->max = 0; + for (i = 0; i < 65536; i++) + s->histogram[i] = 0; + return af_test_output(af, data); +} + +static void stats_print(struct af_stats *s) +{ + int i; + long long sum; + float v; + long long h[MAX_DB]; + + s->tsquare /= 32768 * 32768; + mp_msg(MSGT_AFILTER, MSGL_INFO, "stats: n_samples: %lld\n", s->n_samples); + if (s->n_samples == 0) + return; + mp_msg(MSGT_AFILTER, MSGL_INFO, "stats: mean_volume: -%d dB\n", + logdb(s->tsquare / s->n_samples)); + mp_msg(MSGT_AFILTER, MSGL_INFO, "stats: max_volume: -%d dB\n", + logdb(s->max / 32768.0)); + for (i = 0; i < MAX_DB; i++) + h[i] = 0; + for (i = 0; i < 65536; i++) { + v = (i - 32768) / 32768.0; + h[logdb(v * v)] += s->histogram[i]; + } + for (i = 0; i < MAX_DB; i++) + if (h[i] != 0) + break; + sum = 0; + for (; i < MAX_DB; i++) { + sum += h[i]; + mp_msg(MSGT_AFILTER, MSGL_INFO, "stats:histogram_%ddb: %lld\n", + i, h[i]); + if (sum > s->n_samples / 1000) + break; + } +} + +static int control(struct af_instance_s *af, int cmd, void *arg) +{ + struct af_stats *s = (struct af_stats *)af->setup; + + switch(cmd) { + case AF_CONTROL_REINIT: + return stats_init(af, s, arg); + + case AF_CONTROL_PRE_DESTROY: + stats_print(s); + return AF_OK; + } + return AF_UNKNOWN; +} + +static void uninit(struct af_instance_s *af) +{ + if (af->data) + free(af->data); + if (af->setup) + free(af->setup); +} + +static af_data_t *play(struct af_instance_s *af, af_data_t *data) +{ + struct af_stats *s = (struct af_stats *)af->setup; + int16_t *a, *aend; + int v, v2; + + a = data->audio; + aend = (int16_t *)((char *)data->audio + data->len); + s->n_samples += aend - a; + for (; a < aend; a++) { + v = *a; + v2 = v * v; + s->tsquare += v2; + s->histogram[v + 32768]++; + if (v2 > s->max) + s->max = v2; + } + return data; +} + +static int af_open(af_instance_t* af){ + af->control = control; + af->uninit = uninit; + af->play = play; + af->mul = 1; + af->data = malloc(sizeof(af_data_t)); + af->setup = malloc(sizeof(struct af_stats)); + if (af->data == NULL || af->setup == NULL) + return AF_ERROR; + return AF_OK; +} + +af_info_t af_info_stats = { + "Statistics audio filter", + "stats", + "Nicolas George", + "", + 0, + af_open +}; From db757ae96bef4e296de7badcf9cd0921b8756705 Mon Sep 17 00:00:00 2001 From: diego Date: Sat, 21 Feb 2009 21:29:38 +0000 Subject: [PATCH 07/22] Add missing #include "config.h", fixes the warning: libaf/af.c:23:5: warning: "HAVE_MALLOC_H" is not defined git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28697 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libaf/af.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libaf/af.c b/libaf/af.c index 77f30a4d45..1f7a1b0be8 100644 --- a/libaf/af.c +++ b/libaf/af.c @@ -16,6 +16,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#include "config.h" #include #include #include From 45626ad18cba03a67c904af579a8f25d8b4a1901 Mon Sep 17 00:00:00 2001 From: uau Date: Sat, 21 Feb 2009 22:07:39 +0000 Subject: [PATCH 08/22] af_stats: Some fixes to the new filter The just committed af_stats was an older version of the patch with broken max volume calculation. Fix that and do some cleanup. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28698 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libaf/af_stats.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/libaf/af_stats.c b/libaf/af_stats.c index dc24802e16..3d78f72faa 100644 --- a/libaf/af_stats.c +++ b/libaf/af_stats.c @@ -28,8 +28,7 @@ #define MAX_DB 80 #define MIN_VAL 1E-8 -struct af_stats -{ +struct af_stats { long long n_samples; double tsquare; int max; @@ -38,8 +37,11 @@ struct af_stats static inline int logdb(double v) { - return v > 1 ? 0 : v <= MIN_VAL ? MAX_DB - 1 : - log(v) / -0.23025850929940456840179914546843642076; + if (v > 1) + return 0; + if (v <= MIN_VAL) + return MAX_DB - 1; + return log(v) / -0.23025850929940456840179914546843642076; } static int stats_init(af_instance_t *af, struct af_stats *s, af_data_t *data) @@ -73,7 +75,7 @@ static void stats_print(struct af_stats *s) mp_msg(MSGT_AFILTER, MSGL_INFO, "stats: mean_volume: -%d dB\n", logdb(s->tsquare / s->n_samples)); mp_msg(MSGT_AFILTER, MSGL_INFO, "stats: max_volume: -%d dB\n", - logdb(s->max / 32768.0)); + logdb(s->max / (32768.0 * 32768.0))); for (i = 0; i < MAX_DB; i++) h[i] = 0; for (i = 0; i < 65536; i++) { @@ -86,7 +88,7 @@ static void stats_print(struct af_stats *s) sum = 0; for (; i < MAX_DB; i++) { sum += h[i]; - mp_msg(MSGT_AFILTER, MSGL_INFO, "stats:histogram_%ddb: %lld\n", + mp_msg(MSGT_AFILTER, MSGL_INFO, "stats: histogram_%ddb: %lld\n", i, h[i]); if (sum > s->n_samples / 1000) break; @@ -95,7 +97,7 @@ static void stats_print(struct af_stats *s) static int control(struct af_instance_s *af, int cmd, void *arg) { - struct af_stats *s = (struct af_stats *)af->setup; + struct af_stats *s = af->setup; switch(cmd) { case AF_CONTROL_REINIT: @@ -110,15 +112,13 @@ static int control(struct af_instance_s *af, int cmd, void *arg) static void uninit(struct af_instance_s *af) { - if (af->data) - free(af->data); - if (af->setup) - free(af->setup); + free(af->data); + free(af->setup); } static af_data_t *play(struct af_instance_s *af, af_data_t *data) { - struct af_stats *s = (struct af_stats *)af->setup; + struct af_stats *s = af->setup; int16_t *a, *aend; int v, v2; @@ -136,7 +136,8 @@ static af_data_t *play(struct af_instance_s *af, af_data_t *data) return data; } -static int af_open(af_instance_t* af){ +static int af_open(af_instance_t *af) +{ af->control = control; af->uninit = uninit; af->play = play; From fa33e96dd8a9780d6761241c420debe2e16387f7 Mon Sep 17 00:00:00 2001 From: diego Date: Sat, 21 Feb 2009 22:08:50 +0000 Subject: [PATCH 09/22] Make alpha arch detection more lenient. Taken from the Debian patchset. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28699 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 2766f547af..47935601d1 100755 --- a/configure +++ b/configure @@ -159,7 +159,7 @@ ppc() { alpha() { case "$host_arch" in - alpha) return 0;; + alpha*) return 0;; *) return 1;; esac } @@ -2183,7 +2183,7 @@ EOF ;; - alpha) + alpha*) _arch='ALPHA' _target_arch='ARCH_ALPHA = yes' iproc='alpha' From c548a42f3c424d285451c4f40e1542e7743c2973 Mon Sep 17 00:00:00 2001 From: kostya Date: Sun, 22 Feb 2009 09:22:05 +0000 Subject: [PATCH 10/22] New LGPLed YUV2RGB table generator for SwScaler git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28700 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libswscale/Makefile | 3 +- libswscale/swscale.c | 2 - libswscale/swscale.h | 2 +- libswscale/yuv2rgb2.c | 683 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 685 insertions(+), 5 deletions(-) create mode 100644 libswscale/yuv2rgb2.c diff --git a/libswscale/Makefile b/libswscale/Makefile index a959661b51..9ebe825266 100644 --- a/libswscale/Makefile +++ b/libswscale/Makefile @@ -5,10 +5,9 @@ FFLIBS = avutil HEADERS = swscale.h -OBJS = rgb2rgb.o swscale.o swscale_avoption.o +OBJS = rgb2rgb.o swscale.o swscale_avoption.o yuv2rgb2.o OBJS-$(ARCH_BFIN) += internal_bfin.o swscale_bfin.o yuv2rgb_bfin.o -OBJS-$(CONFIG_GPL) += yuv2rgb.o OBJS-$(CONFIG_MLIB) += yuv2rgb_mlib.o OBJS-$(HAVE_ALTIVEC) += yuv2rgb_altivec.o OBJS-$(HAVE_VIS) += yuv2rgb_vis.o diff --git a/libswscale/swscale.c b/libswscale/swscale.c index 6ba56bcb96..2982857209 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -2331,14 +2331,12 @@ SwsContext *sws_getContext(int srcW, int srcH, enum PixelFormat srcFormat, int d { c->swScale= PlanarToNV12Wrapper; } -#if CONFIG_GPL /* yuv2bgr */ if ((srcFormat==PIX_FMT_YUV420P || srcFormat==PIX_FMT_YUV422P) && (isBGR(dstFormat) || isRGB(dstFormat)) && !(flags & SWS_ACCURATE_RND) && !(dstH&1)) { c->swScale= sws_yuv2rgb_get_func_ptr(c); } -#endif if (srcFormat==PIX_FMT_YUV410P && dstFormat==PIX_FMT_YUV420P && !(flags & SWS_BITEXACT)) { diff --git a/libswscale/swscale.h b/libswscale/swscale.h index f73a5bfe52..6efd90fcda 100644 --- a/libswscale/swscale.h +++ b/libswscale/swscale.h @@ -31,7 +31,7 @@ #define LIBSWSCALE_VERSION_MAJOR 0 #define LIBSWSCALE_VERSION_MINOR 7 -#define LIBSWSCALE_VERSION_MICRO 0 +#define LIBSWSCALE_VERSION_MICRO 1 #define LIBSWSCALE_VERSION_INT AV_VERSION_INT(LIBSWSCALE_VERSION_MAJOR, \ LIBSWSCALE_VERSION_MINOR, \ diff --git a/libswscale/yuv2rgb2.c b/libswscale/yuv2rgb2.c new file mode 100644 index 0000000000..53a0d4e7b8 --- /dev/null +++ b/libswscale/yuv2rgb2.c @@ -0,0 +1,683 @@ +/* + * software YUV to RGB converter + * + * Copyright (C) 2009 Konstantin Shishkov + * + * MMX/MMX2 template stuff (needed for fast movntq support), + * 1,4,8bpp support and context / deglobalize stuff + * by Michael Niedermayer (michaelni@gmx.at) + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include +#include +#include +#include + +#include "config.h" +#include "rgb2rgb.h" +#include "swscale.h" +#include "swscale_internal.h" + +#define DITHER1XBPP // only for MMX + +extern const uint8_t dither_8x8_32[8][8]; +extern const uint8_t dither_8x8_73[8][8]; +extern const uint8_t dither_8x8_220[8][8]; + +#if HAVE_MMX && CONFIG_GPL + +/* hope these constant values are cache line aligned */ +DECLARE_ASM_CONST(8, uint64_t, mmx_00ffw) = 0x00ff00ff00ff00ffULL; +DECLARE_ASM_CONST(8, uint64_t, mmx_redmask) = 0xf8f8f8f8f8f8f8f8ULL; +DECLARE_ASM_CONST(8, uint64_t, mmx_grnmask) = 0xfcfcfcfcfcfcfcfcULL; + +//MMX versions +#undef RENAME +#undef HAVE_MMX2 +#undef HAVE_AMD3DNOW +#define HAVE_MMX2 0 +#define HAVE_AMD3DNOW 0 +#define RENAME(a) a ## _MMX +#include "yuv2rgb_template.c" + +//MMX2 versions +#undef RENAME +#undef HAVE_MMX2 +#define HAVE_MMX2 1 +#define RENAME(a) a ## _MMX2 +#include "yuv2rgb_template.c" + +#endif /* HAVE_MMX && CONFIG_GPL */ + +const int32_t ff_yuv2rgb_coeffs[8][4] = { + {117504, 138453, 13954, 34903}, /* no sequence_display_extension */ + {117504, 138453, 13954, 34903}, /* ITU-R Rec. 709 (1990) */ + {104597, 132201, 25675, 53279}, /* unspecified */ + {104597, 132201, 25675, 53279}, /* reserved */ + {104448, 132798, 24759, 53109}, /* FCC */ + {104597, 132201, 25675, 53279}, /* ITU-R Rec. 624-4 System B, G */ + {104597, 132201, 25675, 53279}, /* SMPTE 170M */ + {117579, 136230, 16907, 35559} /* SMPTE 240M (1987) */ +}; + +#define LOADCHROMA(i) \ + U = pu[i]; \ + V = pv[i]; \ + r = (void *)c->table_rV[V]; \ + g = (void *)(c->table_gU[U] + c->table_gV[V]); \ + b = (void *)c->table_bU[U]; + +#define PUTRGB(dst,src,i,o) \ + Y = src[2*i+o]; \ + dst[2*i ] = r[Y] + g[Y] + b[Y]; \ + Y = src[2*i+1-o]; \ + dst[2*i+1] = r[Y] + g[Y] + b[Y]; + +#define PUTRGB24(dst,src,i) \ + Y = src[2*i]; \ + dst[6*i+0] = r[Y]; dst[6*i+1] = g[Y]; dst[6*i+2] = b[Y]; \ + Y = src[2*i+1]; \ + dst[6*i+3] = r[Y]; dst[6*i+4] = g[Y]; dst[6*i+5] = b[Y]; + +#define PUTBGR24(dst,src,i) \ + Y = src[2*i]; \ + dst[6*i+0] = b[Y]; dst[6*i+1] = g[Y]; dst[6*i+2] = r[Y]; \ + Y = src[2*i+1]; \ + dst[6*i+3] = b[Y]; dst[6*i+4] = g[Y]; dst[6*i+5] = r[Y]; + +#define YUV2RGBFUNC(func_name, dst_type) \ +static int func_name(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY, \ + int srcSliceH, uint8_t* dst[], int dstStride[]){\ + int y;\ +\ + if (c->srcFormat == PIX_FMT_YUV422P) {\ + srcStride[1] *= 2;\ + srcStride[2] *= 2;\ + }\ + for (y=0; y>1)*srcStride[1];\ + uint8_t *pv = src[2] + (y>>1)*srcStride[2];\ + unsigned int h_size = c->dstW>>3;\ + while (h_size--) {\ + int av_unused U, V;\ + int Y;\ + +#define ENDYUV2RGBLINE(dst_delta)\ + pu += 4;\ + pv += 4;\ + py_1 += 8;\ + py_2 += 8;\ + dst_1 += dst_delta;\ + dst_2 += dst_delta;\ + }\ + if (c->dstW & 4) {\ + int av_unused Y, U, V;\ + +#define ENDYUV2RGBFUNC()\ + }\ + }\ + return srcSliceH;\ +} + +#define CLOSEYUV2RGBFUNC(dst_delta)\ + ENDYUV2RGBLINE(dst_delta)\ + ENDYUV2RGBFUNC() + +YUV2RGBFUNC(yuv2rgb_c_32, uint32_t) + LOADCHROMA(0); + PUTRGB(dst_1,py_1,0,0); + PUTRGB(dst_2,py_2,0,1); + + LOADCHROMA(1); + PUTRGB(dst_2,py_2,1,1); + PUTRGB(dst_1,py_1,1,0); + LOADCHROMA(1); + PUTRGB(dst_2,py_2,1,1); + PUTRGB(dst_1,py_1,1,0); + + LOADCHROMA(2); + PUTRGB(dst_1,py_1,2,0); + PUTRGB(dst_2,py_2,2,1); + + LOADCHROMA(3); + PUTRGB(dst_2,py_2,3,1); + PUTRGB(dst_1,py_1,3,0); +ENDYUV2RGBLINE(8) + LOADCHROMA(0); + PUTRGB(dst_1,py_1,0,0); + PUTRGB(dst_2,py_2,0,1); + + LOADCHROMA(1); + PUTRGB(dst_2,py_2,1,1); + PUTRGB(dst_1,py_1,1,0); +ENDYUV2RGBFUNC() + +YUV2RGBFUNC(yuv2rgb_c_24_rgb, uint8_t) + LOADCHROMA(0); + PUTRGB24(dst_1,py_1,0); + PUTRGB24(dst_2,py_2,0); + + LOADCHROMA(1); + PUTRGB24(dst_2,py_2,1); + PUTRGB24(dst_1,py_1,1); + + LOADCHROMA(2); + PUTRGB24(dst_1,py_1,2); + PUTRGB24(dst_2,py_2,2); + + LOADCHROMA(3); + PUTRGB24(dst_2,py_2,3); + PUTRGB24(dst_1,py_1,3); +ENDYUV2RGBLINE(24) + LOADCHROMA(0); + PUTRGB24(dst_1,py_1,0); + PUTRGB24(dst_2,py_2,0); + + LOADCHROMA(1); + PUTRGB24(dst_2,py_2,1); + PUTRGB24(dst_1,py_1,1); +ENDYUV2RGBFUNC() + +// only trivial mods from yuv2rgb_c_24_rgb +YUV2RGBFUNC(yuv2rgb_c_24_bgr, uint8_t) + LOADCHROMA(0); + PUTBGR24(dst_1,py_1,0); + PUTBGR24(dst_2,py_2,0); + + LOADCHROMA(1); + PUTBGR24(dst_2,py_2,1); + PUTBGR24(dst_1,py_1,1); + + LOADCHROMA(2); + PUTBGR24(dst_1,py_1,2); + PUTBGR24(dst_2,py_2,2); + + LOADCHROMA(3); + PUTBGR24(dst_2,py_2,3); + PUTBGR24(dst_1,py_1,3); +ENDYUV2RGBLINE(24) + LOADCHROMA(0); + PUTBGR24(dst_1,py_1,0); + PUTBGR24(dst_2,py_2,0); + + LOADCHROMA(1); + PUTBGR24(dst_2,py_2,1); + PUTBGR24(dst_1,py_1,1); +ENDYUV2RGBFUNC() + +// This is exactly the same code as yuv2rgb_c_32 except for the types of +// r, g, b, dst_1, dst_2 +YUV2RGBFUNC(yuv2rgb_c_16, uint16_t) + LOADCHROMA(0); + PUTRGB(dst_1,py_1,0,0); + PUTRGB(dst_2,py_2,0,1); + + LOADCHROMA(1); + PUTRGB(dst_2,py_2,1,1); + PUTRGB(dst_1,py_1,1,0); + + LOADCHROMA(2); + PUTRGB(dst_1,py_1,2,0); + PUTRGB(dst_2,py_2,2,1); + + LOADCHROMA(3); + PUTRGB(dst_2,py_2,3,1); + PUTRGB(dst_1,py_1,3,0); +CLOSEYUV2RGBFUNC(8) + +// This is exactly the same code as yuv2rgb_c_32 except for the types of +// r, g, b, dst_1, dst_2 +YUV2RGBFUNC(yuv2rgb_c_8, uint8_t) + LOADCHROMA(0); + PUTRGB(dst_1,py_1,0,0); + PUTRGB(dst_2,py_2,0,1); + + LOADCHROMA(1); + PUTRGB(dst_2,py_2,1,1); + PUTRGB(dst_1,py_1,1,0); + + LOADCHROMA(2); + PUTRGB(dst_1,py_1,2,0); + PUTRGB(dst_2,py_2,2,1); + + LOADCHROMA(3); + PUTRGB(dst_2,py_2,3,1); + PUTRGB(dst_1,py_1,3,0); +CLOSEYUV2RGBFUNC(8) + +// r, g, b, dst_1, dst_2 +YUV2RGBFUNC(yuv2rgb_c_8_ordered_dither, uint8_t) + const uint8_t *d32 = dither_8x8_32[y&7]; + const uint8_t *d64 = dither_8x8_73[y&7]; +#define PUTRGB8(dst,src,i,o) \ + Y = src[2*i]; \ + dst[2*i] = r[Y+d32[0+o]] + g[Y+d32[0+o]] + b[Y+d64[0+o]]; \ + Y = src[2*i+1]; \ + dst[2*i+1] = r[Y+d32[1+o]] + g[Y+d32[1+o]] + b[Y+d64[1+o]]; + + LOADCHROMA(0); + PUTRGB8(dst_1,py_1,0,0); + PUTRGB8(dst_2,py_2,0,0+8); + + LOADCHROMA(1); + PUTRGB8(dst_2,py_2,1,2+8); + PUTRGB8(dst_1,py_1,1,2); + + LOADCHROMA(2); + PUTRGB8(dst_1,py_1,2,4); + PUTRGB8(dst_2,py_2,2,4+8); + + LOADCHROMA(3); + PUTRGB8(dst_2,py_2,3,6+8); + PUTRGB8(dst_1,py_1,3,6); +CLOSEYUV2RGBFUNC(8) + + +// This is exactly the same code as yuv2rgb_c_32 except for the types of +// r, g, b, dst_1, dst_2 +YUV2RGBFUNC(yuv2rgb_c_4, uint8_t) + int acc; +#define PUTRGB4(dst,src,i) \ + Y = src[2*i]; \ + acc = r[Y] + g[Y] + b[Y]; \ + Y = src[2*i+1]; \ + acc |= (r[Y] + g[Y] + b[Y])<<4; \ + dst[i] = acc; + + LOADCHROMA(0); + PUTRGB4(dst_1,py_1,0); + PUTRGB4(dst_2,py_2,0); + + LOADCHROMA(1); + PUTRGB4(dst_2,py_2,1); + PUTRGB4(dst_1,py_1,1); + + LOADCHROMA(2); + PUTRGB4(dst_1,py_1,2); + PUTRGB4(dst_2,py_2,2); + + LOADCHROMA(3); + PUTRGB4(dst_2,py_2,3); + PUTRGB4(dst_1,py_1,3); +CLOSEYUV2RGBFUNC(4) + +YUV2RGBFUNC(yuv2rgb_c_4_ordered_dither, uint8_t) + const uint8_t *d64 = dither_8x8_73[y&7]; + const uint8_t *d128 = dither_8x8_220[y&7]; + int acc; + +#define PUTRGB4D(dst,src,i,o) \ + Y = src[2*i]; \ + acc = r[Y+d128[0+o]] + g[Y+d64[0+o]] + b[Y+d128[0+o]]; \ + Y = src[2*i+1]; \ + acc |= (r[Y+d128[1+o]] + g[Y+d64[1+o]] + b[Y+d128[1+o]])<<4; \ + dst[i]= acc; + + LOADCHROMA(0); + PUTRGB4D(dst_1,py_1,0,0); + PUTRGB4D(dst_2,py_2,0,0+8); + + LOADCHROMA(1); + PUTRGB4D(dst_2,py_2,1,2+8); + PUTRGB4D(dst_1,py_1,1,2); + + LOADCHROMA(2); + PUTRGB4D(dst_1,py_1,2,4); + PUTRGB4D(dst_2,py_2,2,4+8); + + LOADCHROMA(3); + PUTRGB4D(dst_2,py_2,3,6+8); + PUTRGB4D(dst_1,py_1,3,6); +CLOSEYUV2RGBFUNC(4) + +// This is exactly the same code as yuv2rgb_c_32 except for the types of +// r, g, b, dst_1, dst_2 +YUV2RGBFUNC(yuv2rgb_c_4b, uint8_t) + LOADCHROMA(0); + PUTRGB(dst_1,py_1,0,0); + PUTRGB(dst_2,py_2,0,1); + + LOADCHROMA(1); + PUTRGB(dst_2,py_2,1,1); + PUTRGB(dst_1,py_1,1,0); + + LOADCHROMA(2); + PUTRGB(dst_1,py_1,2,0); + PUTRGB(dst_2,py_2,2,1); + + LOADCHROMA(3); + PUTRGB(dst_2,py_2,3,1); + PUTRGB(dst_1,py_1,3,0); +CLOSEYUV2RGBFUNC(8) + +YUV2RGBFUNC(yuv2rgb_c_4b_ordered_dither, uint8_t) + const uint8_t *d64 = dither_8x8_73[y&7]; + const uint8_t *d128 = dither_8x8_220[y&7]; + +#define PUTRGB4DB(dst,src,i,o) \ + Y = src[2*i]; \ + dst[2*i] = r[Y+d128[0+o]] + g[Y+d64[0+o]] + b[Y+d128[0+o]]; \ + Y = src[2*i+1]; \ + dst[2*i+1] = r[Y+d128[1+o]] + g[Y+d64[1+o]] + b[Y+d128[1+o]]; + + LOADCHROMA(0); + PUTRGB4DB(dst_1,py_1,0,0); + PUTRGB4DB(dst_2,py_2,0,0+8); + + LOADCHROMA(1); + PUTRGB4DB(dst_2,py_2,1,2+8); + PUTRGB4DB(dst_1,py_1,1,2); + + LOADCHROMA(2); + PUTRGB4DB(dst_1,py_1,2,4); + PUTRGB4DB(dst_2,py_2,2,4+8); + + LOADCHROMA(3); + PUTRGB4DB(dst_2,py_2,3,6+8); + PUTRGB4DB(dst_1,py_1,3,6); +CLOSEYUV2RGBFUNC(8) + +YUV2RGBFUNC(yuv2rgb_c_1_ordered_dither, uint8_t) + const uint8_t *d128 = dither_8x8_220[y&7]; + char out_1 = 0, out_2 = 0; + g= c->table_gU[128] + c->table_gV[128]; + +#define PUTRGB1(out,src,i,o) \ + Y = src[2*i]; \ + out+= out + g[Y+d128[0+o]]; \ + Y = src[2*i+1]; \ + out+= out + g[Y+d128[1+o]]; + + PUTRGB1(out_1,py_1,0,0); + PUTRGB1(out_2,py_2,0,0+8); + + PUTRGB1(out_2,py_2,1,2+8); + PUTRGB1(out_1,py_1,1,2); + + PUTRGB1(out_1,py_1,2,4); + PUTRGB1(out_2,py_2,2,4+8); + + PUTRGB1(out_2,py_2,3,6+8); + PUTRGB1(out_1,py_1,3,6); + + dst_1[0]= out_1; + dst_2[0]= out_2; +CLOSEYUV2RGBFUNC(1) + +SwsFunc sws_yuv2rgb_get_func_ptr(SwsContext *c) +{ + SwsFunc t = NULL; +#if (HAVE_MMX2 || HAVE_MMX) && CONFIG_GPL + if (c->flags & SWS_CPU_CAPS_MMX2) { + switch (c->dstFormat) { + case PIX_FMT_RGB32: return yuv420_rgb32_MMX2; + case PIX_FMT_BGR24: return yuv420_rgb24_MMX2; + case PIX_FMT_RGB565: return yuv420_rgb16_MMX2; + case PIX_FMT_RGB555: return yuv420_rgb15_MMX2; + } + } + if (c->flags & SWS_CPU_CAPS_MMX) { + switch (c->dstFormat) { + case PIX_FMT_RGB32: return yuv420_rgb32_MMX; + case PIX_FMT_BGR24: return yuv420_rgb24_MMX; + case PIX_FMT_RGB565: return yuv420_rgb16_MMX; + case PIX_FMT_RGB555: return yuv420_rgb15_MMX; + } + } +#endif +#if HAVE_VIS + t = sws_yuv2rgb_init_vis(c); +#endif +#if CONFIG_MLIB + t = sws_yuv2rgb_init_mlib(c); +#endif +#if HAVE_ALTIVEC && CONFIG_GPL + if (c->flags & SWS_CPU_CAPS_ALTIVEC) + t = sws_yuv2rgb_init_altivec(c); +#endif + +#if ARCH_BFIN + if (c->flags & SWS_CPU_CAPS_BFIN) + t = sws_ff_bfin_yuv2rgb_get_func_ptr(c); +#endif + + if (t) + return t; + + av_log(c, AV_LOG_WARNING, "No accelerated colorspace conversion found.\n"); + + switch (c->dstFormat) { + case PIX_FMT_BGR32_1: + case PIX_FMT_RGB32_1: + case PIX_FMT_BGR32: + case PIX_FMT_RGB32: return yuv2rgb_c_32; + case PIX_FMT_RGB24: return yuv2rgb_c_24_rgb; + case PIX_FMT_BGR24: return yuv2rgb_c_24_bgr; + case PIX_FMT_RGB565: + case PIX_FMT_BGR565: + case PIX_FMT_RGB555: + case PIX_FMT_BGR555: return yuv2rgb_c_16; + case PIX_FMT_RGB8: + case PIX_FMT_BGR8: return yuv2rgb_c_8_ordered_dither; + case PIX_FMT_RGB4: + case PIX_FMT_BGR4: return yuv2rgb_c_4_ordered_dither; + case PIX_FMT_RGB4_BYTE: + case PIX_FMT_BGR4_BYTE: return yuv2rgb_c_4b_ordered_dither; + case PIX_FMT_MONOBLACK: return yuv2rgb_c_1_ordered_dither; + default: + assert(0); + } + return NULL; +} + +static void fill_table(uint8_t* table[256], const int elemsize, const int inc, uint8_t *y_table) +{ + int i; + int64_t cb = 0; + + y_table -= elemsize * (inc >> 9); + + for (i = 0; i < 256; i++) { + table[i] = y_table + elemsize * (cb >> 16); + cb += inc; + } +} + +static void fill_gv_table(int table[256], const int elemsize, const int inc) +{ + int i; + int64_t cb = 0; + int off = -(inc >> 9); + + for (i = 0; i < 256; i++) { + table[i] = elemsize * (off + (cb >> 16)); + cb += inc; + } +} + +av_cold int sws_yuv2rgb_c_init_tables(SwsContext *c, const int inv_table[4], int fullRange, + int brightness, int contrast, int saturation) +{ + const int isRgb = c->dstFormat==PIX_FMT_RGB32 + || c->dstFormat==PIX_FMT_RGB32_1 + || c->dstFormat==PIX_FMT_BGR24 + || c->dstFormat==PIX_FMT_RGB565 + || c->dstFormat==PIX_FMT_RGB555 + || c->dstFormat==PIX_FMT_RGB8 + || c->dstFormat==PIX_FMT_RGB4 + || c->dstFormat==PIX_FMT_RGB4_BYTE + || c->dstFormat==PIX_FMT_MONOBLACK; + const int bpp = fmt_depth(c->dstFormat); + uint8_t *y_table; + uint16_t *y_table16; + uint32_t *y_table32; + int i, base, rbase, gbase, bbase; + const int yoffs = fullRange ? 384 : 326; + + int64_t crv = inv_table[0]; + int64_t cbu = inv_table[1]; + int64_t cgu = -inv_table[2]; + int64_t cgv = -inv_table[3]; + int64_t cy = 1<<16; + int64_t oy = 0; + + int64_t yb = 0; + + if (!fullRange) { + cy = (cy*255) / 219; + oy = 16<<16; + } else { + crv = (crv*224) / 255; + cbu = (cbu*224) / 255; + cgu = (cgu*224) / 255; + cgv = (cgv*224) / 255; + } + + cy = (cy *contrast ) >> 16; + crv = (crv*contrast * saturation) >> 32; + cbu = (cbu*contrast * saturation) >> 32; + cgu = (cgu*contrast * saturation) >> 32; + cgv = (cgv*contrast * saturation) >> 32; + oy -= 256*brightness; + + //scale coefficients by cy + crv = ((crv << 16) + 0x8000) / cy; + cbu = ((cbu << 16) + 0x8000) / cy; + cgu = ((cgu << 16) + 0x8000) / cy; + cgv = ((cgv << 16) + 0x8000) / cy; + + av_free(c->yuvTable); + + switch (bpp) { + case 1: + c->yuvTable = av_malloc(1024); + y_table = c->yuvTable; + yb = -(384<<16) - oy; + for (i = 0; i < 1024-110; i++) { + y_table[i+110] = av_clip_uint8((yb + 0x8000) >> 16) >> 7; + yb += cy; + } + fill_table(c->table_gU, 1, cgu, y_table + yoffs); + fill_gv_table(c->table_gV, 1, cgv); + break; + case 4: + case 4|128: + rbase = isRgb ? 3 : 0; + gbase = 1; + bbase = isRgb ? 0 : 3; + c->yuvTable = av_malloc(1024*3); + y_table = c->yuvTable; + yb = -(384<<16) - oy; + for (i = 0; i < 1024-110; i++) { + int yval = av_clip_uint8((yb + 0x8000) >> 16); + y_table[i+110 ] = (yval >> 7) << rbase; + y_table[i+ 37+1024] = ((yval + 43) / 85) << gbase; + y_table[i+110+2048] = (yval >> 7) << bbase; + yb += cy; + } + fill_table(c->table_rV, 1, crv, y_table + yoffs); + fill_table(c->table_gU, 1, cgu, y_table + yoffs + 1024); + fill_table(c->table_bU, 1, cbu, y_table + yoffs + 2048); + fill_gv_table(c->table_gV, 1, cgv); + break; + case 8: + rbase = isRgb ? 5 : 0; + gbase = isRgb ? 2 : 3; + bbase = isRgb ? 0 : 6; + c->yuvTable = av_malloc(1024*3); + y_table = c->yuvTable; + yb = -(384<<16) - oy; + for (i = 0; i < 1024-38; i++) { + int yval = av_clip_uint8((yb + 0x8000) >> 16); + y_table[i+16 ] = ((yval + 18) / 36) << rbase; + y_table[i+16+1024] = ((yval + 18) / 36) << gbase; + y_table[i+37+2048] = ((yval + 43) / 85) << bbase; + yb += cy; + } + fill_table(c->table_rV, 1, crv, y_table + yoffs); + fill_table(c->table_gU, 1, cgu, y_table + yoffs + 1024); + fill_table(c->table_bU, 1, cbu, y_table + yoffs + 2048); + fill_gv_table(c->table_gV, 1, cgv); + break; + case 15: + case 16: + rbase = isRgb ? bpp - 5 : 0; + gbase = 5; + bbase = isRgb ? 0 : (bpp - 5); + c->yuvTable = av_malloc(1024*3*2); + y_table16 = c->yuvTable; + yb = -(384<<16) - oy; + for (i = 0; i < 1024; i++) { + uint8_t yval = av_clip_uint8((yb + 0x8000) >> 16); + y_table16[i ] = (yval >> 3) << rbase; + y_table16[i+1024] = (yval >> (18 - bpp)) << gbase; + y_table16[i+2048] = (yval >> 3) << bbase; + yb += cy; + } + fill_table(c->table_rV, 2, crv, y_table16 + yoffs); + fill_table(c->table_gU, 2, cgu, y_table16 + yoffs + 1024); + fill_table(c->table_bU, 2, cbu, y_table16 + yoffs + 2048); + fill_gv_table(c->table_gV, 2, cgv); + break; + case 24: + c->yuvTable = av_malloc(1024); + y_table = c->yuvTable; + yb = -(384<<16) - oy; + for (i = 0; i < 1024; i++) { + y_table[i] = av_clip_uint8((yb + 0x8000) >> 16); + yb += cy; + } + fill_table(c->table_rV, 1, crv, y_table + yoffs); + fill_table(c->table_gU, 1, cgu, y_table + yoffs); + fill_table(c->table_bU, 1, cbu, y_table + yoffs); + fill_gv_table(c->table_gV, 1, cgv); + break; + case 32: + base = (c->dstFormat == PIX_FMT_RGB32_1 || c->dstFormat == PIX_FMT_BGR32_1) ? 8 : 0; + rbase = base + (isRgb ? 16 : 0); + gbase = base + 8; + bbase = base + (isRgb ? 0 : 16); + c->yuvTable = av_malloc(1024*3*4); + y_table32 = c->yuvTable; + yb = -(384<<16) - oy; + for (i = 0; i < 1024; i++) { + uint8_t yval = av_clip_uint8((yb + 0x8000) >> 16); + y_table32[i ] = yval << rbase; + y_table32[i+1024] = yval << gbase; + y_table32[i+2048] = yval << bbase; + yb += cy; + } + fill_table(c->table_rV, 4, crv, y_table32 + yoffs); + fill_table(c->table_gU, 4, cgu, y_table32 + yoffs + 1024); + fill_table(c->table_bU, 4, cbu, y_table32 + yoffs + 2048); + fill_gv_table(c->table_gV, 4, cgv); + break; + default: + c->yuvTable = NULL; + av_log(c, AV_LOG_ERROR, "%ibpp not supported by yuv2rgb\n", bpp); + return -1; + } + return 0; +} From f4e93fdc48b06abbce7419112a484c2a832270ec Mon Sep 17 00:00:00 2001 From: kostya Date: Sun, 22 Feb 2009 09:25:13 +0000 Subject: [PATCH 11/22] SwScaler now has new YUV2RGB table generator git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28701 b3059339-0415-0410-9bf9-f77b7e298cf2 --- Changelog | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Changelog b/Changelog index e299463574..818fea087f 100644 --- a/Changelog +++ b/Changelog @@ -131,6 +131,8 @@ MPlayer (1.0) * vo_macosx can now be compiled in 64-bits mode * OpenGL support for unmodified MinGW64 + SWScaler: + * new LGPLed YUV to RGB tables generator rc2try2: From ee50536b743272a8000e76b6565dbddbf938eccd Mon Sep 17 00:00:00 2001 From: diego Date: Sun, 22 Feb 2009 14:12:33 +0000 Subject: [PATCH 12/22] Accept DVB API 5, patch by Steven Brudenell, steven.brudenell gmail com. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28702 b3059339-0415-0410-9bf9-f77b7e298cf2 --- stream/dvbin.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/stream/dvbin.h b/stream/dvbin.h index 84c9d2c625..dcb22ce238 100644 --- a/stream/dvbin.h +++ b/stream/dvbin.h @@ -38,9 +38,16 @@ #undef DVB_ATSC #if defined(DVB_API_VERSION_MINOR) -#if DVB_API_VERSION == 3 && DVB_API_VERSION_MINOR >= 1 + +/* kernel headers >=2.6.28 have version 5. + * + * FIXME: are there any real differences between 3.1 and 5? + */ + +#if (DVB_API_VERSION == 3 && DVB_API_VERSION_MINOR >= 1) || DVB_API_VERSION == 5 #define DVB_ATSC 1 #endif + #endif From 9aa9e865179c0e56989db233d8a99116cadef352 Mon Sep 17 00:00:00 2001 From: uau Date: Mon, 23 Feb 2009 01:39:27 +0000 Subject: [PATCH 13/22] configure: Make the special dvdnav test the last one again The libdvdnav linker flag handling is hacky and can add flags that make any compile attempt using them fail unless MPlayer's internal dvdread has been compiled and is linked as a part of the resulting binary. For this reason no more tests using the common flags can be performed after the flags from the dvdnav test have been added. However the dvdnav test was no longer the last one despite some warning comments. Move it back to the last position and make the warnings a bit more explicit. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28703 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 90 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 47 insertions(+), 43 deletions(-) diff --git a/configure b/configure index 47935601d1..41809c65dd 100755 --- a/configure +++ b/configure @@ -7873,49 +7873,6 @@ fi echores "$_maemo" fi -#this must be the last test to be performed or the ones following it will likely fail -#because libdvdnavmini is intentionally not linked against libdvdread (to permit mplayer -# to use its own copy of the library) -echocheck "DVD support (libdvdnav)" -dvdnav_internal=no -if test "$_dvdnav" = auto ; then - if test "$_dvdread_internal" = yes ; then - _dvdnav=yes - dvdnav_internal=yes - _res_comment="internal" - else - $_dvdnavconfig --version --minilibs >> $TMPLOG 2>&1 || _dvdnav=no - fi -fi -if test "$_dvdnav" = auto ; then - cat > $TMPC < -#include -int main(void) { dvdnav_t *dvd=0; return 0; } -EOF - _dvdnav=no - _dvdnavdir=`$_dvdnavconfig --cflags` - _dvdnavlibs=`$_dvdnavconfig --libs` - cc_check $_dvdnavdir $_dvdnavlibs $_ld_dl $_ld_pthread && _dvdnav=yes -fi -if test "$_dvdnav" = yes ; then - _largefiles=yes - def_dvdnav='#define CONFIG_DVDNAV 1' - if test "$dvdnav_internal" = yes ; then - _inc_extra="$_inc_extra -Ilibdvdnav" - _inputmodules="dvdnav(internal) $_inputmodules" - else - _inc_extra="$_inc_extra `$_dvdnavconfig --cflags`" - _ld_extra="$_ld_extra `$_dvdnavconfig --minilibs`" - _inputmodules="dvdnav $_inputmodules" - fi -else - def_dvdnav='#undef CONFIG_DVDNAV' - _noinputmodules="dvdnav $_noinputmodules" -fi -echores "$_dvdnav" - - ############################################################################# # On OS/2 nm supports only a.out. So the -Zomf compiler option to generate @@ -7981,6 +7938,53 @@ fi cc_check -mno-omit-leaf-frame-pointer && cflags_no_omit_leaf_frame_pointer="-mno-omit-leaf-frame-pointer" +# This must be the last test to be performed. Any other tests following it +# could fail due to linker errors. libdvdnavmini is intentionally not linked +# against libdvdread (to permit MPlayer to use its own copy of the library). +# So any compilation using the flags added here but not linking against +# libdvdread can fail. +echocheck "DVD support (libdvdnav)" +dvdnav_internal=no +if test "$_dvdnav" = auto ; then + if test "$_dvdread_internal" = yes ; then + _dvdnav=yes + dvdnav_internal=yes + _res_comment="internal" + else + $_dvdnavconfig --version --minilibs >> $TMPLOG 2>&1 || _dvdnav=no + fi +fi +if test "$_dvdnav" = auto ; then + cat > $TMPC < +#include +int main(void) { dvdnav_t *dvd=0; return 0; } +EOF + _dvdnav=no + _dvdnavdir=`$_dvdnavconfig --cflags` + _dvdnavlibs=`$_dvdnavconfig --libs` + cc_check $_dvdnavdir $_dvdnavlibs $_ld_dl $_ld_pthread && _dvdnav=yes +fi +if test "$_dvdnav" = yes ; then + _largefiles=yes + def_dvdnav='#define CONFIG_DVDNAV 1' + if test "$dvdnav_internal" = yes ; then + _inc_extra="$_inc_extra -Ilibdvdnav" + _inputmodules="dvdnav(internal) $_inputmodules" + else + _inc_extra="$_inc_extra `$_dvdnavconfig --cflags`" + _ld_extra="$_ld_extra `$_dvdnavconfig --minilibs`" + _inputmodules="dvdnav $_inputmodules" + fi +else + def_dvdnav='#undef CONFIG_DVDNAV' + _noinputmodules="dvdnav $_noinputmodules" +fi +echores "$_dvdnav" + +# DO NOT ADD ANY TESTS THAT USE LINKER FLAGS HERE (like cc_check). +# Read dvdnav comment above. + ############################################################################# echo "Creating config.mak" cat > config.mak << EOF From 6b7aa125cc2244b58f00b845cb836578f647c112 Mon Sep 17 00:00:00 2001 From: zuxy Date: Mon, 23 Feb 2009 03:35:07 +0000 Subject: [PATCH 14/22] Get rid of the outdated and unmaintained CPU codename table. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28704 b3059339-0415-0410-9bf9-f77b7e298cf2 --- cpudetect.c | 41 +--- cputable.h | 549 ---------------------------------------------------- 2 files changed, 1 insertion(+), 589 deletions(-) delete mode 100644 cputable.h diff --git a/cpudetect.c b/cpudetect.c index 8d306b1c3b..5da169dfc0 100644 --- a/cpudetect.c +++ b/cpudetect.c @@ -229,16 +229,7 @@ void GetCpuCaps( CpuCaps *caps) #endif // RUNTIME_CPUDETECT } - -#define CPUID_EXTFAMILY ((regs2[0] >> 20)&0xFF) /* 27..20 */ -#define CPUID_EXTMODEL ((regs2[0] >> 16)&0x0F) /* 19..16 */ -#define CPUID_TYPE ((regs2[0] >> 12)&0x04) /* 13..12 */ -#define CPUID_FAMILY ((regs2[0] >> 8)&0x0F) /* 11..08 */ -#define CPUID_MODEL ((regs2[0] >> 4)&0x0F) /* 07..04 */ -#define CPUID_STEPPING ((regs2[0] >> 0)&0x0F) /* 03..00 */ - char *GetCpuFriendlyName(unsigned int regs[], unsigned int regs2[]){ -#include "cputable.h" /* get cpuname and cpuvendors */ char vendor[13]; char *retname; int i; @@ -247,6 +238,7 @@ char *GetCpuFriendlyName(unsigned int regs[], unsigned int regs2[]){ mp_msg(MSGT_CPUDETECT,MSGL_FATAL,"Error: GetCpuFriendlyName() not enough memory\n"); exit(1); } + retname[0] = '\0'; sprintf(vendor,"%.4s%.4s%.4s",(char*)(regs+1),(char*)(regs+3),(char*)(regs+2)); @@ -254,46 +246,15 @@ char *GetCpuFriendlyName(unsigned int regs[], unsigned int regs2[]){ if (regs[0] >= 0x80000004) { // CPU has built-in namestring - retname[0] = '\0'; for (i = 0x80000002; i <= 0x80000004; i++) { do_cpuid(i, regs); strncat(retname, (char*)regs, 16); } - return retname; } - - for(i=0; i - * - * This file is part of MPlayer. - * - * MPlayer is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * MPlayer is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with MPlayer; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#ifndef MPLAYER_CPUTABLE_H -#define MPLAYER_CPUTABLE_H - -#define MAX_VENDORS 8 /* Number of CPU Vendors */ - -//#define N_UNKNOWN "unknown" -//#define N_UNKNOWNEXT "unknown extended model" -#define N_UNKNOWN "" -#define N_UNKNOWNEXT "" - -#define F_UNKNOWN { \ -N_UNKNOWN, \ -N_UNKNOWN, \ -N_UNKNOWN, \ -N_UNKNOWN, \ -N_UNKNOWN, \ -N_UNKNOWN, \ -N_UNKNOWN, \ -N_UNKNOWN, \ -N_UNKNOWN, \ -N_UNKNOWN, \ -N_UNKNOWN, \ -N_UNKNOWN, \ -N_UNKNOWN, \ -N_UNKNOWN, \ -N_UNKNOWN, \ -N_UNKNOWN \ -} - -static const char *cpuname - /* Vendor */ [MAX_VENDORS] - /* Family */ [16] - /* Model */ [16] - ={ - /* Intel Corporation, "GenuineIntel" */ { - /* 0 */ F_UNKNOWN, - /* 1 */ F_UNKNOWN, - /* 2 */ F_UNKNOWN, - /* 3 i386 */ F_UNKNOWN, /* XXX new 386 chips may support CPUID! */ - /* 4 i486 */ { - /* 0 */ "i486DX-25/33", /* only few of these */ - /* 1 */ "i486DX-50", /* support CPUID! */ - /* 2 */ "i486SX", - /* 3 */ "i486DX2", /* CPUID only on new chips! */ - /* 4 */ "i486SL", - /* 5 */ "i486SX2", - /* 6 */ N_UNKNOWN, - /* 7 */ "i486DX2/write-back", /* returns 3 in write-through mode */ - /* 8 */ "i486DX4", - /* 9 */ "i486DX4/write-back", - /* A */ N_UNKNOWN, - /* B */ N_UNKNOWN, - /* C */ N_UNKNOWN, - /* D */ N_UNKNOWN, - /* E */ N_UNKNOWN, - /* F */ N_UNKNOWNEXT - }, - /* 5 i586 */ { - /* 0 */ "Pentium P5 A-step", - /* 1 */ "Pentium P5", - /* 2 */ "Pentium P54C", - /* 3 */ "Pentium OverDrive P24T", - /* 4 */ "Pentium MMX P55C", - /* 5 */ N_UNKNOWN, /* XXX DX4 OverDrive? */ - /* 6 */ N_UNKNOWN, /* XXX P5 OverDrive? */ - /* 7 */ "Pentium P54C (new)", - /* 8 */ "Pentium MMX P55C (new)", - /* 9 */ N_UNKNOWN, - /* A */ N_UNKNOWN, - /* B */ N_UNKNOWN, - /* C */ N_UNKNOWN, - /* D */ N_UNKNOWN, - /* E */ N_UNKNOWN, - /* F */ N_UNKNOWNEXT - }, - /* 6 i686 */ { - /* 0 */ "PentiumPro A-step", - /* 1 */ "PentiumPro", - /* 2 */ N_UNKNOWN, - /* 3 */ "Pentium II Klamath/Pentium II OverDrive", - /* 4 */ N_UNKNOWN, /* XXX P55CT - OverDrive for P54? */ - /* 5 */ "Celeron Covington/Pentium II Deschutes,Tonga/Pentium II Xeon", - /* 6 */ "Celeron A Mendocino/Pentium II Dixon", - /* 7 */ "Pentium III Katmai/Pentium III Xeon Tanner", - /* 8 */ "Celeron 2/Pentium III Coppermine,Geyserville", - /* 9 */ "Pentium M Banias", /* XXX check */ - /* A */ "Pentium III Xeon Cascades", - /* B */ "Celeron 2/Pentium III Tualatin", - /* C */ N_UNKNOWN, - /* D */ "Pentium M Dothan", - /* E */ N_UNKNOWN, - /* F */ N_UNKNOWNEXT - }, - /* 7 Itanium */ { /* XXX check */ - /* 0 */ "Itanium Merced", - /* 1 */ N_UNKNOWN, - /* 2 */ N_UNKNOWN, - /* 3 */ N_UNKNOWN, - /* 4 */ N_UNKNOWN, - /* 5 */ N_UNKNOWN, - /* 6 */ N_UNKNOWN, - /* 7 */ N_UNKNOWN, - /* 8 */ N_UNKNOWN, - /* 9 */ N_UNKNOWN, - /* A */ N_UNKNOWN, - /* B */ N_UNKNOWN, - /* C */ N_UNKNOWN, - /* D */ N_UNKNOWN, - /* E */ N_UNKNOWN, - /* F */ N_UNKNOWNEXT - }, - /* 8 */ F_UNKNOWN, - /* 9 */ F_UNKNOWN, - /* A */ F_UNKNOWN, - /* B */ F_UNKNOWN, - /* C */ F_UNKNOWN, - /* D */ F_UNKNOWN, - /* E */ F_UNKNOWN, - /* F extended family (P4/new IA-64)*/ { - /* 0 */ "Pentium 4 Willamette; Xeon Foster", - /* 1 */ "Pentium 4 Willamette; Xeon Foster", - /* 2 */ "Pentium 4/Celeron 4 Northwood; Pentium 4 EE/Xeon Prestonia,Gallatin", - /* 3 */ "Pentium 4/Celeron D Prescott; Xeon Nocona", - /* 4 */ "Pentium 4/Celeron D Prescott; Pentium D/XE Smithfield; Xeon Nocona,Irwindale", - /* 5 */ N_UNKNOWN, - /* 6 */ N_UNKNOWN, - /* 7 */ N_UNKNOWN, - /* 8 */ N_UNKNOWN, - /* 9 */ N_UNKNOWN, - /* A */ N_UNKNOWN, - /* B */ N_UNKNOWN, - /* C */ N_UNKNOWN, - /* D */ N_UNKNOWN, - /* E */ N_UNKNOWN, - /* F */ N_UNKNOWNEXT - } - #if 0 /* out of table index boundaries */ - /* 1F Itanium 2 */ { /* XXX check */ - /* 0 */ "Itanium 2 McKinley", - /* 1 */ "Itanium 2 Madison", /* I coded on that :-) */ - /* 2 */ N_UNKNOWN, - /* 3 */ N_UNKNOWN, - /* 4 */ N_UNKNOWN, - /* 5 */ N_UNKNOWN, - /* 6 */ N_UNKNOWN, - /* 7 */ N_UNKNOWN, - /* 8 */ N_UNKNOWN, - /* 9 */ N_UNKNOWN, - /* A */ N_UNKNOWN, - /* B */ N_UNKNOWN, - /* C */ N_UNKNOWN, - /* D */ N_UNKNOWN, - /* E */ N_UNKNOWN, - /* F */ N_UNKNOWNEXT - }, - #endif - }, - /* United Microelectronics Corporation, "UMC UMC UMC " */ { - /* 0 */ F_UNKNOWN, - /* 1 */ F_UNKNOWN, - /* 2 */ F_UNKNOWN, - /* 3 */ F_UNKNOWN, - /* 4 486 (U5) */ { - /* 0 */ N_UNKNOWN, - /* 1 */ "486DX U5D", - /* 2 */ "486SX U5S", - /* 3 */ N_UNKNOWN, - /* 4 */ N_UNKNOWN, - /* 5 */ N_UNKNOWN, - /* 6 */ N_UNKNOWN, - /* 7 */ N_UNKNOWN, - /* 8 */ N_UNKNOWN, - /* 9 */ N_UNKNOWN, - /* A */ N_UNKNOWN, - /* B */ N_UNKNOWN, - /* C */ N_UNKNOWN, - /* D */ N_UNKNOWN, - /* E */ N_UNKNOWN, - /* F */ N_UNKNOWN - }, - /* 5 */ F_UNKNOWN, - /* 6 */ F_UNKNOWN, - /* 7 */ F_UNKNOWN, - /* 8 */ F_UNKNOWN, - /* 9 */ F_UNKNOWN, - /* A */ F_UNKNOWN, - /* B */ F_UNKNOWN, - /* C */ F_UNKNOWN, - /* D */ F_UNKNOWN, - /* E */ F_UNKNOWN, - /* F */ F_UNKNOWN - }, - /* Advanced Micro Devices, "AuthenticAMD" (very rare: "AMD ISBETTER") */ { - /* 0 */ F_UNKNOWN, - /* 1 */ F_UNKNOWN, - /* 2 */ F_UNKNOWN, - /* 3 */ F_UNKNOWN, - /* 4 486/5x86 */ { - /* 0 */ N_UNKNOWN, - /* 1 */ N_UNKNOWN, - /* 2 */ N_UNKNOWN, - /* 3 */ "486DX2", - /* 4 */ N_UNKNOWN, - /* 5 */ N_UNKNOWN, - /* 6 */ N_UNKNOWN, - /* 7 */ "486DX2/write-back", - /* 8 */ "486DX4/5x86", - /* 9 */ "486DX4/write-back", - /* A */ N_UNKNOWN, - /* B */ N_UNKNOWN, - /* C */ N_UNKNOWN, - /* D */ N_UNKNOWN, - /* E */ "5x86", - /* F */ "5x86/write-back" - }, - /* 5 K5/K6 */ { - /* 0 */ "K5 SSA5 (PR75,PR90,PR100)", - /* 1 */ "K5 5k86 (PR120,PR133)", - /* 2 */ "K5 5k86 (PR166)", - /* 3 */ "K5 5k86 (PR200)", - /* 4 */ N_UNKNOWN, - /* 5 */ N_UNKNOWN, - /* 6 */ "K6", - /* 7 */ "K6 Little Foot", - /* 8 */ "K6-2", - /* 9 */ "K6-III Chomper", - /* A */ N_UNKNOWN, - /* B */ N_UNKNOWN, - /* C */ N_UNKNOWN, - /* D */ "K6-2+/K6-III+ Sharptooth", - /* E */ N_UNKNOWN, - /* F */ N_UNKNOWN - }, - /* 6 K7 */ { - /* 0 */ N_UNKNOWN, /* Argon? */ - /* 1 */ "Athlon K7", - /* 2 */ "Athlon K75 Pluto,Orion", - /* 3 */ "Duron Spitfire", - /* 4 */ "Athlon Thunderbird", - /* 5 */ N_UNKNOWN, - /* 6 */ "Duron/Athlon 4/MP/XP Palomino", - /* 7 */ "Duron Morgan,Camaro", - /* 8 */ "Sempron/Athlon MP/XP Thoroughbred; Duron Applebred", - /* 9 */ N_UNKNOWN, - /* A */ "Sempron/Athlon MP/XP/XP-M Barton,Thorton", - /* B */ N_UNKNOWN, - /* E */ N_UNKNOWN, - /* C */ N_UNKNOWN, - /* D */ N_UNKNOWN, - /* F */ N_UNKNOWN - }, - /* 7 */ F_UNKNOWN, - /* 8 */ F_UNKNOWN, - /* 9 */ F_UNKNOWN, - /* A */ F_UNKNOWN, - /* B */ F_UNKNOWN, - /* C */ F_UNKNOWN, - /* D */ F_UNKNOWN, - /* E */ F_UNKNOWN, - /* F K8 */ { - /* 0 */ N_UNKNOWN, - /* 1 */ "Opteron Egypt,Italy,Denmark", - /* 2 */ N_UNKNOWN, - /* 3 */ "Athlon 64 X2 Manchester,Toledo", - /* 4 */ "Athlon 64 Clawhammer; Athlon 64 X2 Toledo; Turion Newark,Lancaster", - /* 5 */ "Athlon 64 FX/Opteron Sledgehammer,Athens,Troy,Venus", - /* 6 */ N_UNKNOWN, - /* 7 */ "Athlon 64/FX Sledgehammer,San Diego,Venice", - /* 8 */ "Mobile Athlon 64 Newcastle; Mobile Sempron Dublin", - /* 9 */ N_UNKNOWN, - /* A */ N_UNKNOWN, - /* B */ "Athlon 64 Newcastle; Athlon 64 X2 Manchester", - /* E */ N_UNKNOWN, - /* C */ "Athlon 64 Newcastle,Odesssa,Oakville,Venice; Sempron Palermo,Paris,Dublin", - /* D */ N_UNKNOWN, - /* F */ "Athlon 64 Newcastle,Winchester,San Diego,Venice; Sempron Palermo" - } - - }, - /* Cyrix Corp./VIA Inc., "CyrixInstead" */ { - /* 0 */ F_UNKNOWN, - /* 1 */ F_UNKNOWN, - /* 2 */ F_UNKNOWN, - /* 3 */ F_UNKNOWN, - /* 4 5x86 */ { - /* 0 */ N_UNKNOWN, - /* 1 */ N_UNKNOWN, - /* 2 */ N_UNKNOWN, - /* 3 */ N_UNKNOWN, - /* 4 */ "MediaGX", - /* 5 */ N_UNKNOWN, - /* 6 */ N_UNKNOWN, - /* 7 */ N_UNKNOWN, - /* 8 */ N_UNKNOWN, - /* 9 */ "5x86", /* CPUID maybe only on newer chips */ - /* A */ N_UNKNOWN, - /* B */ N_UNKNOWN, - /* E */ N_UNKNOWN, - /* C */ N_UNKNOWN, - /* D */ N_UNKNOWN, - /* F */ N_UNKNOWN - }, - /* 5 M1 */ { - /* 0 */ "M1 test-sample", /*?*/ - /* 1 */ N_UNKNOWN, - /* 2 */ "6x86 M1", - /* 3 */ "6x86L M1", - /* 4 */ "GXm", - /* 5 */ N_UNKNOWN, - /* 6 */ N_UNKNOWN, - /* 7 */ N_UNKNOWN, - /* 8 */ N_UNKNOWN, - /* 9 */ N_UNKNOWN, - /* A */ N_UNKNOWN, - /* B */ N_UNKNOWN, - /* E */ N_UNKNOWN, - /* C */ N_UNKNOWN, - /* D */ N_UNKNOWN, - /* F */ N_UNKNOWN - }, - /* 6 M2 */ { - /* 0 */ "6x86MX M2/M-II", - /* 1 */ N_UNKNOWN, - /* 2 */ N_UNKNOWN, - /* 3 */ N_UNKNOWN, - /* 4 */ N_UNKNOWN, - /* 5 */ "Cyrix III Joshua (M2 core)", - /* 6 */ N_UNKNOWN, - /* 7 */ N_UNKNOWN, - /* 8 */ N_UNKNOWN, - /* 9 */ N_UNKNOWN, - /* A */ N_UNKNOWN, - /* B */ N_UNKNOWN, - /* E */ N_UNKNOWN, - /* C */ N_UNKNOWN, - /* D */ N_UNKNOWN, - /* F */ N_UNKNOWN - }, - /* 7 */ F_UNKNOWN, - /* 8 */ F_UNKNOWN, - /* 9 */ F_UNKNOWN, - /* A */ F_UNKNOWN, - /* B */ F_UNKNOWN, - /* C */ F_UNKNOWN, - /* D */ F_UNKNOWN, - /* E */ F_UNKNOWN, - /* F */ F_UNKNOWN - }, - /* NexGen Inc., "NexGenDriven" */ { - /* 0 */ F_UNKNOWN, - /* 1 */ F_UNKNOWN, - /* 2 */ F_UNKNOWN, - /* 3 */ F_UNKNOWN, - /* 4 */ F_UNKNOWN, - /* 5 Nx586 */ { - /* 0 */ "Nx586/Nx586FPU", /* only newer ones support CPUID! */ - /* 1 */ N_UNKNOWN, - /* 2 */ N_UNKNOWN, - /* 3 */ N_UNKNOWN, - /* 4 */ N_UNKNOWN, - /* 5 */ N_UNKNOWN, - /* 6 */ N_UNKNOWN, - /* 7 */ N_UNKNOWN, - /* 8 */ N_UNKNOWN, - /* 9 */ N_UNKNOWN, - /* A */ N_UNKNOWN, - /* B */ N_UNKNOWN, - /* E */ N_UNKNOWN, - /* C */ N_UNKNOWN, - /* D */ N_UNKNOWN, - /* F */ N_UNKNOWN - }, - /* 6 */ F_UNKNOWN, - /* 7 */ F_UNKNOWN, - /* 8 */ F_UNKNOWN, - /* 9 */ F_UNKNOWN, - /* A */ F_UNKNOWN, - /* B */ F_UNKNOWN, - /* C */ F_UNKNOWN, - /* D */ F_UNKNOWN, - /* E */ F_UNKNOWN, - /* F */ F_UNKNOWN - }, - /* IDT/Centaur/VIA, "CentaurHauls" */ { - /* 0 */ F_UNKNOWN, - /* 1 */ F_UNKNOWN, - /* 2 */ F_UNKNOWN, - /* 3 */ F_UNKNOWN, - /* 4 */ F_UNKNOWN, - /* 5 IDT C6 WinChip */ { - /* 0 */ N_UNKNOWN, - /* 1 */ N_UNKNOWN, - /* 2 */ N_UNKNOWN, - /* 3 */ N_UNKNOWN, - /* 4 */ "WinChip C6", - /* 5 */ N_UNKNOWN, - /* 6 */ "Samuel", - /* 7 */ N_UNKNOWN, - /* 8 */ "WinChip 2 C6+,W2,W2A,W2B", - /* 9 */ "WinChip 3 W3", - /* A */ "WinChip 4 W4A", /* XXX check */ - /* B */ N_UNKNOWN, - /* E */ N_UNKNOWN, - /* C */ N_UNKNOWN, - /* D */ N_UNKNOWN, - /* F */ N_UNKNOWN - }, - /* 6 VIA C3 */ { - /* 0 */ N_UNKNOWN, - /* 1 */ N_UNKNOWN, - /* 2 */ N_UNKNOWN, - /* 3 */ N_UNKNOWN, - /* 4 */ N_UNKNOWN, - /* 5 */ N_UNKNOWN, - /* 6 */ "Cyrix III Samuel (WinChip C5A core)", - /* 7 */ "C3 Samuel 2 (WinChip C5B core)/C3 Ezra", - /* 8 */ "C3 Ezra-T", - /* 9 */ "C3 Nehemiah", - /* A */ N_UNKNOWN, - /* B */ N_UNKNOWN, - /* E */ N_UNKNOWN, - /* C */ N_UNKNOWN, - /* D */ N_UNKNOWN, - /* F */ N_UNKNOWN - }, - /* 7 */ F_UNKNOWN, - /* 8 */ F_UNKNOWN, - /* 9 */ F_UNKNOWN, - /* A */ F_UNKNOWN, - /* B */ F_UNKNOWN, - /* C */ F_UNKNOWN, - /* D */ F_UNKNOWN, - /* E */ F_UNKNOWN, - /* F */ F_UNKNOWN - }, - /* Rise, "RiseRiseRise" */ { - /* 0 */ F_UNKNOWN, - /* 1 */ F_UNKNOWN, - /* 2 */ F_UNKNOWN, - /* 3 */ F_UNKNOWN, - /* 4 */ F_UNKNOWN, - /* 5 mP6 */ { - /* 0 */ "mP6 iDragon 6401,6441 Kirin", - /* 1 */ "mP6 iDragon 6510 Lynx", - /* 2 */ N_UNKNOWN, - /* 3 */ N_UNKNOWN, - /* 4 */ N_UNKNOWN, - /* 5 */ N_UNKNOWN, - /* 6 */ N_UNKNOWN, - /* 7 */ N_UNKNOWN, - /* 8 */ "mP6 iDragon II", - /* 9 */ "mP6 iDragon II (new)", - /* A */ N_UNKNOWN, - /* B */ N_UNKNOWN, - /* E */ N_UNKNOWN, - /* C */ N_UNKNOWN, - /* D */ N_UNKNOWN, - /* F */ N_UNKNOWN - }, - /* 6 */ F_UNKNOWN, - /* 7 */ F_UNKNOWN, - /* 8 */ F_UNKNOWN, - /* 9 */ F_UNKNOWN, - /* A */ F_UNKNOWN, - /* B */ F_UNKNOWN, - /* C */ F_UNKNOWN, - /* D */ F_UNKNOWN, - /* E */ F_UNKNOWN, - /* F */ F_UNKNOWN - }, - /* Transmeta, "GenuineTMx86" */ { - /* 0 */ F_UNKNOWN, - /* 1 */ F_UNKNOWN, - /* 2 */ F_UNKNOWN, - /* 3 */ F_UNKNOWN, - /* 4 */ F_UNKNOWN, - /* 5 Crusoe */ { - /* 0 */ N_UNKNOWN, - /* 1 */ N_UNKNOWN, - /* 2 */ N_UNKNOWN, - /* 3 */ N_UNKNOWN, - /* 4 */ "Crusoe TM3x00,TM5x00", - /* 5 */ N_UNKNOWN, - /* 6 */ N_UNKNOWN, - /* 7 */ N_UNKNOWN, - /* 8 */ N_UNKNOWN, - /* 9 */ N_UNKNOWN, - /* A */ N_UNKNOWN, - /* B */ N_UNKNOWN, - /* E */ N_UNKNOWN, - /* C */ N_UNKNOWN, - /* D */ N_UNKNOWN, - /* F */ N_UNKNOWN - }, - /* 6 */ F_UNKNOWN, - /* 7 */ F_UNKNOWN, - /* 8 */ F_UNKNOWN, - /* 9 */ F_UNKNOWN, - /* A */ F_UNKNOWN, - /* B */ F_UNKNOWN, - /* C */ F_UNKNOWN, - /* D */ F_UNKNOWN, - /* E */ F_UNKNOWN, - /* F */ F_UNKNOWN - } -}; - -#undef N_UNKNOWNEXT -#undef N_UNKNOWN -#undef F_UNKNOWN - -static const struct { - char string[13]; - char name[48]; -} cpuvendors[MAX_VENDORS] ={ - {"GenuineIntel","Intel"}, - {"UMC UMC UMC ","United Microelectronics Corporation"}, - {"AuthenticAMD","Advanced Micro Devices"}, - {"CyrixInstead","Cyrix/VIA"}, - {"NexGenDriven","NexGen"}, - {"CentaurHauls","IDT/Centaur/VIA"}, - {"RiseRiseRise","Rise"}, - {"GenuineTMx86","Transmeta"} -}; - -#endif /* MPLAYER_CPUTABLE_H */ From 554e7dcae7cc77f3416e8b299ef9ad008db19e49 Mon Sep 17 00:00:00 2001 From: bircoph Date: Mon, 23 Feb 2009 05:16:48 +0000 Subject: [PATCH 15/22] Synced with r28704. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28705 b3059339-0415-0410-9bf9-f77b7e298cf2 --- DOCS/man/ru/mplayer.1 | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/DOCS/man/ru/mplayer.1 b/DOCS/man/ru/mplayer.1 index 19c7cb468d..28efcf0fb4 100644 --- a/DOCS/man/ru/mplayer.1 +++ b/DOCS/man/ru/mplayer.1 @@ -2,7 +2,7 @@ .\" This man page was/is done by Gabucino, Diego Biurrun, Jonas Jermann .\" Translated by Vladimir Voroshilov .\" Encoding: koi8-r -.\" synced with r28670 +.\" synced with r28704 . .\" -------------------------------------------------------------------------- .\" @@ -5554,6 +5554,15 @@ scale .RE .PD 1 . +.TP +.B "stats\ \ " + , +. + + . + + volume. +. . . .SH " " From 4abfea0c2cda0b9854cdf472d1cc23b68121caf4 Mon Sep 17 00:00:00 2001 From: bircoph Date: Mon, 23 Feb 2009 05:23:12 +0000 Subject: [PATCH 16/22] Update some statements: 1) Suggest larger read ahead buffer. 2) Note how sdparm may be used to adjust scsi device speed. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28706 b3059339-0415-0410-9bf9-f77b7e298cf2 --- DOCS/xml/en/cd-dvd.xml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/DOCS/xml/en/cd-dvd.xml b/DOCS/xml/en/cd-dvd.xml index fafc76410d..535f62fe08 100644 --- a/DOCS/xml/en/cd-dvd.xml +++ b/DOCS/xml/en/cd-dvd.xml @@ -53,7 +53,7 @@ If you set it to too high, the drive will continuously spin up and down, and will dramatically decrease the performance. It is recommended that you also tune your CD-ROM drive with hdparm: -hdparm -d1 -a8 -u1 [cdrom device] +hdparm -d1 -a256 -u1 [cdrom device] @@ -68,8 +68,16 @@ for fine-tuning your CD-ROM. -SCSI drives do not have a uniform way of setting these parameters (Do you know -one? Tell us!) There is a tool that works for +You may tweak the speed of SCSI CD-ROM drives with +sdparm, you need version 1.03 or higher: +sdparm --command=speed=[speed in kB/s] [cdrom device] +Speed must be specified in kilobytes per second, the drive will +round it as appropriate. Please refer to the sdparm man page for +details. + + + +There is also a dedicated tool that works for Plextor SCSI drives. From ea9561424848da0ba0f5fb2410aaf2e12e3accd6 Mon Sep 17 00:00:00 2001 From: bircoph Date: Mon, 23 Feb 2009 05:34:26 +0000 Subject: [PATCH 17/22] Update faq about power management effect taking into account that -rtc is default no longer. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28707 b3059339-0415-0410-9bf9-f77b7e298cf2 --- DOCS/xml/en/faq.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DOCS/xml/en/faq.xml b/DOCS/xml/en/faq.xml index 0173cb8c95..83989dbf3a 100644 --- a/DOCS/xml/en/faq.xml +++ b/DOCS/xml/en/faq.xml @@ -590,7 +590,7 @@ It works normal when i run it as a user. This is again a power management effect (see above). Plug the external power connector in before you power on your notebook -or use the option. +or make sure you do not use the option. From 94896e02d5e71d2c9cb1b295671d947ab3a68acd Mon Sep 17 00:00:00 2001 From: bircoph Date: Mon, 23 Feb 2009 05:45:31 +0000 Subject: [PATCH 18/22] Synced with r28706. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28708 b3059339-0415-0410-9bf9-f77b7e298cf2 --- DOCS/xml/ru/cd-dvd.xml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/DOCS/xml/ru/cd-dvd.xml b/DOCS/xml/ru/cd-dvd.xml index bc1ad4d82e..2fc96328d3 100644 --- a/DOCS/xml/ru/cd-dvd.xml +++ b/DOCS/xml/ru/cd-dvd.xml @@ -1,5 +1,5 @@ - + Использование CD/DVD @@ -54,7 +54,7 @@ дисках с царапинами). Если поставить слишком большое значение, то постоянный запуск и остановка вращения диска ужасно снизят эффективность. Рекомендуется также подстроить привод, используя hdparm: -hdparm -d1 -a8 -u1 [устройство cdrom] +hdparm -d1 -a256 -u1 [устройство cdrom] @@ -70,9 +70,17 @@ -У SCSI приводов нет общего способа выставить эти параметры (Вы знаете -какой-нибудь? Расскажите нам!) Существует программа для -Plextor SCSI приводов. +Вы можете настроить скорость SCSI CD-ROM приводов с помощью +sdparm, необходима версия 1.03 или выше: +sdparm --command=speed=[скорость в кБ/с] [устройство cdrom] +Скорость должна быть указана в килобайтах в секунду, привод +округлит её надлежащим образом. Пожалуйста, обратитесь с странице +руководства sdparm для деталей. + + + +There is also a dedicated tool that works for +Plextor SCSI drives. From f775f43f287d2ed31b263655f0fe749a0fb1b53c Mon Sep 17 00:00:00 2001 From: bircoph Date: Mon, 23 Feb 2009 05:47:40 +0000 Subject: [PATCH 19/22] Synced with r28707. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28709 b3059339-0415-0410-9bf9-f77b7e298cf2 --- DOCS/xml/ru/faq.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DOCS/xml/ru/faq.xml b/DOCS/xml/ru/faq.xml index 99c87172c0..7addcabb2e 100644 --- a/DOCS/xml/ru/faq.xml +++ b/DOCS/xml/ru/faq.xml @@ -1,5 +1,5 @@ - + Часто Задаваемые вопросы @@ -578,7 +578,7 @@ Windows Media 9.) Это тоже эффект системы управления энергопотреблением (смотрите выше). Подсоедините разъем внешнего питания до -включения ноутбука либо используйте опцию . +включения ноутбука либо убедитесь, что не используется опция . From 51d0a5fcc1516ff50eb28e756e2175f98fc70354 Mon Sep 17 00:00:00 2001 From: reimar Date: Mon, 23 Feb 2009 09:21:57 +0000 Subject: [PATCH 20/22] EOSD/ASS support for vo_vdpau.c Patch by Grigori G (greg chown ath cx) with minor cosmetic changes by me. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28710 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_vdpau.c | 188 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 187 insertions(+), 1 deletion(-) diff --git a/libvo/vo_vdpau.c b/libvo/vo_vdpau.c index a2ffcb6a01..a1cd8774a7 100644 --- a/libvo/vo_vdpau.c +++ b/libvo/vo_vdpau.c @@ -50,6 +50,9 @@ #include "libavutil/common.h" +#include "libass/ass.h" +#include "libass/ass_mp.h" + static vo_info_t info = { "VDPAU with X11", "vdpau", @@ -78,6 +81,9 @@ LIBVO_EXTERN(vdpau) /* number of palette entries */ #define PALETTE_SIZE 256 +/* Initial maximum number of EOSD surfaces */ +#define EOSD_SURFACES_INITIAL 512 + /* * Global variable declaration - VDPAU specific */ @@ -125,6 +131,11 @@ static VdpPresentationQueueTargetCreateX11 *vdp_presentation_queue_target_ /* output_surfaces[2] is used in composite-picture. */ static VdpOutputSurfaceRenderOutputSurface *vdp_output_surface_render_output_surface; static VdpOutputSurfacePutBitsIndexed *vdp_output_surface_put_bits_indexed; +static VdpOutputSurfaceRenderBitmapSurface *vdp_output_surface_render_bitmap_surface; + +static VdpBitmapSurfaceCreate *vdp_bitmap_surface_create; +static VdpBitmapSurfaceDestroy *vdp_bitmap_surface_destroy; +static VdpBitmapSurfacePutBitsNative *vdp_bitmap_surface_putbits_native; static VdpDecoderCreate *vdp_decoder_create; static VdpDecoderDestroy *vdp_decoder_destroy; @@ -159,6 +170,26 @@ static unsigned char *index_data; static int index_data_size; static uint32_t palette[PALETTE_SIZE]; +// EOSD +// Pool of surfaces +struct { + VdpBitmapSurface surface; + int w; + int h; + char in_use; +} *eosd_surfaces; + +// List of surfaces to be rendered +struct { + VdpBitmapSurface surface; + VdpRect source; + VdpRect dest; + VdpColor color; +} *eosd_targets; + +static int eosd_render_count; +static int eosd_surface_count; + /* * X11 specific */ @@ -286,6 +317,12 @@ static int win_x11_init_vdpau_procs(void) {VDP_FUNC_ID_DECODER_CREATE, &vdp_decoder_create}, {VDP_FUNC_ID_DECODER_RENDER, &vdp_decoder_render}, {VDP_FUNC_ID_DECODER_DESTROY, &vdp_decoder_destroy}, + {VDP_FUNC_ID_BITMAP_SURFACE_CREATE, &vdp_bitmap_surface_create}, + {VDP_FUNC_ID_BITMAP_SURFACE_DESTROY, &vdp_bitmap_surface_destroy}, + {VDP_FUNC_ID_BITMAP_SURFACE_PUT_BITS_NATIVE, + &vdp_bitmap_surface_putbits_native}, + {VDP_FUNC_ID_OUTPUT_SURFACE_RENDER_BITMAP_SURFACE, + &vdp_output_surface_render_bitmap_surface}, {0, NULL} }; @@ -563,10 +600,125 @@ static void draw_osd_I8A8(int x0,int y0, int w,int h, unsigned char *src, CHECK_ST_WARNING("Error when calling vdp_output_surface_render_output_surface") } +static void draw_eosd(void) { + VdpStatus vdp_st; + VdpOutputSurface output_surface = output_surfaces[surface_num]; + VdpOutputSurfaceRenderBlendState blend_state; + int i; + + blend_state.struct_version = VDP_OUTPUT_SURFACE_RENDER_BLEND_STATE_VERSION; + blend_state.blend_factor_source_color = VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_SRC_ALPHA; + blend_state.blend_factor_source_alpha = VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_ONE; + blend_state.blend_factor_destination_color = VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA; + blend_state.blend_factor_destination_alpha = VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_SRC_ALPHA; + blend_state.blend_equation_color = VDP_OUTPUT_SURFACE_RENDER_BLEND_EQUATION_ADD; + blend_state.blend_equation_alpha = VDP_OUTPUT_SURFACE_RENDER_BLEND_EQUATION_ADD; + + for (i=0; iimgs; + ass_image_t *i; + + // Nothing changed, no need to redraw + if (imgs->changed == 0) + return; + eosd_render_count = 0; + // There's nothing to render! + if (!img) + return; + + if (imgs->changed == 1) + goto eosd_skip_upload; + + for (j=0; jnext) { + // Try to reuse a suitable surface + found = -1; + for (j=0; j= i->w && eosd_surfaces[j].h >= i->h) { + found = j; + break; + } + } + // None found, allocate a new surface + if (found < 0) { + for (j=0; jw, i->h, VDP_TRUE, &eosd_surfaces[found].surface); + CHECK_ST_WARNING("EOSD: error when creating surface") + eosd_surfaces[found].w = i->w; + eosd_surfaces[found].h = i->h; + } + eosd_surfaces[found].in_use = 1; + eosd_targets[eosd_render_count].surface = eosd_surfaces[found].surface; + destRect.x0 = 0; + destRect.y0 = 0; + destRect.x1 = i->w; + destRect.y1 = i->h; + vdp_st = vdp_bitmap_surface_putbits_native(eosd_targets[eosd_render_count].surface, + (const void *) &i->bitmap, &i->stride, &destRect); + CHECK_ST_WARNING("EOSD: putbits failed") + eosd_render_count++; + } + +eosd_skip_upload: + eosd_render_count = 0; + for (i = img; i; i = i->next) { + // Render dest, color, etc. + eosd_targets[eosd_render_count].color.alpha = 1.0 - ((i->color >> 0) & 0xff) / 255.0; + eosd_targets[eosd_render_count].color.blue = ((i->color >> 8) & 0xff) / 255.0; + eosd_targets[eosd_render_count].color.green = ((i->color >> 16) & 0xff) / 255.0; + eosd_targets[eosd_render_count].color.red = ((i->color >> 24) & 0xff) / 255.0; + eosd_targets[eosd_render_count].dest.x0 = i->dst_x; + eosd_targets[eosd_render_count].dest.y0 = i->dst_y; + eosd_targets[eosd_render_count].dest.x1 = i->w + i->dst_x; + eosd_targets[eosd_render_count].dest.y1 = i->h + i->dst_y; + eosd_targets[eosd_render_count].source.x0 = 0; + eosd_targets[eosd_render_count].source.y0 = 0; + eosd_targets[eosd_render_count].source.x1 = i->w; + eosd_targets[eosd_render_count].source.y1 = i->h; + eosd_render_count++; + } +} + static void draw_osd(void) { mp_msg(MSGT_VO, MSGL_DBG2, "DRAW_OSD\n"); + draw_eosd(); vo_draw_text_ext(vo_dwidth, vo_dheight, border_x, border_y, border_x, border_y, vid_width, vid_height, draw_osd_I8A8); } @@ -695,7 +847,7 @@ static uint32_t get_image(mp_image_t *mpi) static int query_format(uint32_t format) { - int default_flags = VFCAP_CSP_SUPPORTED | VFCAP_CSP_SUPPORTED_BY_HW | VFCAP_HWSCALE_UP | VFCAP_HWSCALE_DOWN | VFCAP_OSD; + int default_flags = VFCAP_CSP_SUPPORTED | VFCAP_CSP_SUPPORTED_BY_HW | VFCAP_HWSCALE_UP | VFCAP_HWSCALE_DOWN | VFCAP_OSD | VFCAP_EOSD | VFCAP_EOSD_UNSCALED; switch (format) { case IMGFMT_YV12: return default_flags | VOCAP_NOSLICES; @@ -728,6 +880,14 @@ static void DestroyVdpauObjects(void) CHECK_ST_WARNING("Error when calling vdp_output_surface_destroy") } + for (i = 0; imt = r->mb = r->ml = r->mr = 0; + if (vo_fs) { + r->w = vo_screenwidth; + r->h = vo_screenheight; + r->ml = r->mr = border_x; + r->mt = r->mb = border_y; + } else + r->w = vo_dwidth; r->h = vo_dheight; + return VO_TRUE; + } } return VO_NOTIMPL; } From 53e6c7777e1862bcc957d7827d0e3264dd2f9853 Mon Sep 17 00:00:00 2001 From: reimar Date: Mon, 23 Feb 2009 09:22:57 +0000 Subject: [PATCH 21/22] Only check for vdp_video_mixer_destroy failure when we actually executed that function. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28711 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_vdpau.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libvo/vo_vdpau.c b/libvo/vo_vdpau.c index a1cd8774a7..e60c36c3ab 100644 --- a/libvo/vo_vdpau.c +++ b/libvo/vo_vdpau.c @@ -427,9 +427,10 @@ static void free_video_specific(void) { surface_render[i].surface = VDP_INVALID_HANDLE; } - if (video_mixer != VDP_INVALID_HANDLE) + if (video_mixer != VDP_INVALID_HANDLE) { vdp_st = vdp_video_mixer_destroy(video_mixer); - CHECK_ST_WARNING("Error when calling vdp_video_mixer_destroy") + CHECK_ST_WARNING("Error when calling vdp_video_mixer_destroy") + } video_mixer = VDP_INVALID_HANDLE; } From 30aa2383cadb2f879e02dca9df293c01119a3111 Mon Sep 17 00:00:00 2001 From: reimar Date: Mon, 23 Feb 2009 11:48:45 +0000 Subject: [PATCH 22/22] ffvc1vdpau and ffwmv3vdpau should be marked as buggy in the same way as the software decoders, otherwise they will be preferred over the software decoders which just breaks things when using e.g. xv vo. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28712 b3059339-0415-0410-9bf9-f77b7e298cf2 --- etc/codecs.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/codecs.conf b/etc/codecs.conf index 8c2d4a6506..11d0a01e18 100644 --- a/etc/codecs.conf +++ b/etc/codecs.conf @@ -809,7 +809,7 @@ videocodec ffwmv3 videocodec ffwmv3vdpau info "FFmpeg WMV3/WMV9 (VDPAU)" - status working + status buggy fourcc WMV3,wmv3 driver ffmpeg dll wmv3_vdpau @@ -826,7 +826,7 @@ videocodec ffvc1 videocodec ffvc1vdpau info "FFmpeg WVC1 (VDPAU)" - status working + status buggy fourcc WVC1,wvc1,WMVA fourcc vc-1,VC-1 driver ffmpeg